Protected Member Functions | |
_fetchPackages () |
Definition at line 3 of file Collection.php.
_fetchPackages | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Model_Extension_Collection_Abstract.
Definition at line 5 of file Collection.php.
00006 { 00007 // fetch installed packages 00008 $pear = Varien_Pear::getInstance(); 00009 $pear->run('list', array('allchannels'=>1)); 00010 $output = $pear->getOutput(); 00011 00012 // load available packages into array 00013 $packages = array(); 00014 foreach ($output as $i=>$channelRoot) { 00015 $channel = $channelRoot['output']; 00016 if (!isset($channel['headline'])) { 00017 continue; 00018 } 00019 foreach ($channel['data'] as $j=>$pkg) { 00020 $packages[] = array( 00021 'id'=>$channel['channel'].'|'.$pkg[0], 00022 'channel'=>$channel['channel'], 00023 'name'=>$pkg[0], 00024 'version'=>$pkg[1], 00025 'stability'=>$pkg[2], 00026 ); 00027 } 00028 } 00029 00030 return $packages; 00031 }