在这种Magento help page我已经seeen这条命令:提取Magento的事件从app目录
的grep -rin-B2-A2 “法师:: dispatchEvent” 应用/ *> events.txt
我如何通过Windows命令行或.bat文件来做到这一点?或者你认为通过php编程更容易吗?
在这种Magento help page我已经seeen这条命令:提取Magento的事件从app目录
的grep -rin-B2-A2 “法师:: dispatchEvent” 应用/ *> events.txt
我如何通过Windows命令行或.bat文件来做到这一点?或者你认为通过php编程更容易吗?
我已经通过PHP Magento完成了它,但我不知道它是否可以通过Windows命令行来完成。
//Load Magento
require_once('app/Mage.php');
Mage::app();
Mage::setIsDeveloperMode(true);
//Get Config
//header('Content-Type: text/xml');
header('Content-Type: text/plain');
$config = Mage::getConfig()->loadModulesConfiguration('config.xml')->getNode('global/events');
$events = $config[0];
foreach($events as $item){
echo $item->getName()." \n";
}
有窗户的grep: http://www.wingrep.com/
而一个回答SO问题:What are good grep tools for Windows?
Findstr呢? – jrosell 2013-03-03 15:43:46
好主意,但这并不”获取所有的事件。只有使用过的:-( – 2013-03-02 11:36:23