This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Retrieve class name by class group | |
* | |
* @param string $groupType currently supported model, block, helper | |
* @param string $classId slash separated class identifier, ex. group/class | |
* @param string $groupRootNode optional config path for group config | |
* @return string | |
* | |
* @override Override to handle PHP namespaces |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>audio.js</title> | |
<meta content="width=device-width, initial-scale=0.6" name="viewport"> | |
<style> | |
body { | |
font-family: sans-serif; | |
line-height: 1.4; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Recursively remove a directory | |
* | |
* @param string $dirname | |
* @param boolean $followSymlinks | |
* @return boolean | |
*/ | |
function RecursiveRmdir($dirname, $followSymlinks=false) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try { | |
$sxe = simplexml_load_string($xmlstring, 'SimpleXMLIterator'); | |
for ($sxe->rewind(); $sxe->valid(); $sxe->next()) { | |
if ($sxe->hasChildren()) { | |
foreach ($sxe->getChildren() as $element=>$value) { | |
echo $value->species . '<br />'; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="github-repos span-9 last"> | |
<h4>My Github Projects</h4> | |
<ul> | |
<li>Loading...</li> | |
</ul> | |
</div> | |
<div class="github-org-repos span-9 last"> | |
<h4>Baobaz Github Projects</h4> | |
<ul> | |
<li>Loading...</li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$htmlPage = 'http://dayzmod.com/?Download'; // page to parse | |
$versionXPathQuery = '/html/body/section/div[1]/div/div[2]/div[1]/span[2]'; // version XPath query | |
$dateXPathQuery = '/html/body/section/div[1]/div/div[2]/div[2]/text()'; // date XPath query | |
$dateOriginYear = '2013'; // hard coded | |
try { | |
$date = null; | |
$version = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// category source | |
$category_id = '3'; | |
$category = Mage::getModel('catalog/category')->load($category_id); | |
$category_products = $category->getProductsPosition(); | |
// clone category | |
$category_copy = clone $category; | |
$category_copy | |
->setId(null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get download link of a Magento extension from MagentoConnect key | |
* | |
* Dependencies: Zend_Http_Client, Zend_Uri (Zend Framework) | |
*/ | |
class Narno_Mage_Extension | |
{ | |
protected $_key = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Narno Gettext Translate model | |
* (overlap of Mage_Core_Model_Translate) | |
* | |
* Support Gettext file (binary). | |
*/ | |
class Narno_Gettext_Model_Translate extends Mage_Core_Model_Translate | |
{ | |
[...] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Varien_Simplexml_Config overlap to Check the XML validity | |
* of Magento configuration files | |
*/ | |
class Varien_Simplexml_Config { | |
[...] | |
/** | |
* Imports XML file |