This file contains 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
modules | |
└── dev-tools | |
├── files | |
│ └── phpstorm.vmoptions | |
├── templates | |
│ └── phpstorm.desktop.erb | |
└── manifests | |
├── init.pp | |
└── phpstorm.pp |
This file contains 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 | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
$xml = Mage::getConfig()->getNode('global/sales/quote/totals'); | |
$totals = array(); | |
foreach ($xml->children() as $total) { | |
$totals[] = $total->getName(); |
This file contains 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 | |
/** | |
* Cm_Cache_Backend_File | |
* | |
* The stock Zend_Cache_Backend_File backend has extremely poor performance for | |
* cleaning by tags making it become unusable as the number of cached items | |
* increases. This backend make many changes resulting in a huge performance boost, | |
* especially for tag cleaning. | |
* | |
* This cache backend works by indexing tags in files so that tag operations |
This file contains 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 | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
$xml = Mage::app()->getConfig()->getNode('global/resources'); | |
foreach ($xml->children() as $node) { | |
echo $node->getName() . PHP_EOL; | |
} |
This file contains 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 | |
// $foo = Mage::getModel('..... | |
// $bar = Mage::getModel('..... | |
$transaction = Mage::getModel('core/resource_transaction'); | |
$transaction->addObject($foo); | |
$transaction->addObject($bar); | |
$transaction->save(); // runs save on all objects. On error -> rollback |
This file contains 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 | |
require_once 'app/Mage.php'; | |
Mage::app('admin'); | |
$indexer = Mage::getSingleton('catalog/product_flat_indexer'); | |
$indexer->rebuild(22); |
This file contains 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
<?xml version="1.0"?> | |
<config> | |
<stores> | |
<admin> | |
<design> | |
<theme> | |
<default>mytheme</default> | |
</theme> | |
</design> | |
</admin> |
This file contains 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 | |
$input = new StringInput('cache:flush'); | |
// without output | |
$this->getApplication()->run($input, new NullOutput()); | |
// with output | |
$this->getApplication()->run($input, $output); |
This file contains 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 | |
// Init framework | |
require 'app/Mage.php'; | |
Mage::app(); | |
// Factory methods to search for | |
$methods = array( | |
'Mage::helper', | |
'Mage::getModel', | |
'Mage::getResourceModel', |