I hereby claim:
- I am wlvrn on github.
- I am cv (https://keybase.io/cv) on keybase.
- I have a public key whose fingerprint is 228E A7DC A7C4 58C1 7407 5D3A BDFA 0A21 5472 090A
To claim this, I am signing this object:
<?php | |
define('DS', DIRECTORY_SEPARATOR); | |
define('PS', PATH_SEPARATOR); | |
define('BP', dirname(dirname(__FILE__))); | |
Mage::register('original_include_path', get_include_path()); | |
if (defined('COMPILER_INCLUDE_PATH')) { | |
$appPath = COMPILER_INCLUDE_PATH; | |
set_include_path($appPath . PS . Mage::registry('original_include_path')); |
I hereby claim:
To claim this, I am signing this object:
<?php | |
require_once('app/Mage.php'); | |
Mage::app(); | |
$stores = array_map(function($store) { | |
return $store->getId(); | |
}, Mage::app()->getStores(true)); | |
foreach ($stores as $store_id) { | |
// Setup app emulation |
<reference name="product_list"> | |
<!-- If the system configuration node "one_ul_product_list" is true, execute this action --> | |
<action method="setColumnCount" ifconfig="sample/config/one_ul_product_list"> | |
<columns>10000</columns> | |
</action> | |
</reference> |
SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN ( 'column' ) AND TABLE_SCHEMA='database_name'; |
<?php | |
class Layout extends \ArrayIterator | |
{ | |
} | |
class Block extends \ArrayIterator | |
{ | |
protected $_alias; |
<?php | |
public function getInnerIterator() | |
{ | |
return $this->_children; | |
} | |
public function current() | |
{ | |
return $this->getInnerIterator()->current(); | |
} |
<?php | |
public function getInnerIterator() | |
{ | |
return $this->_children; | |
} | |
public function current() | |
{ | |
return $this->getInnerIterator()->current(); | |
} |
<?php | |
$integer = new \SplInt( 5 ); | |
if( false === filter_var( $integer, FILTER_VALIDATE_INT, array( 'options' => array( 'min_range' => 1, 'max_range' => 9 ) ) ) ) | |
{ | |
throw new \InvalidArgumentException( sprintf( 'An integer value of 1 through 9 is required, %s "%s" given.', gettype( $integer ), $integer ) ); | |
} | |
// Result: |
<?xml version="1.0" encoding="UTF-8"?> | |
<layout> | |
<default> | |
<reference name="root"> | |
<block type="core/text_list" name="new_root_node" as="new_root_node" translate="label"> | |
<label>New Root Node</label> | |
</block> | |
</reference> | |
<reference name="new_root_node"> | |
<block type="catalog/text" name="some_block" template="page/html/some_template.phtml" /> |