Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static function getAllDataFromTable()
- {
- $model = Mage::getModel('custom/table');
- $collection = $model->getCollection();
- $array = array();
- foreach ($collection as $item) {
- $array[] = $item->getData();
- }
- return $array;
- }
- /**
- * Mage_Core_Model_Resource_Iterator
- */
- public function getAllDataFromTable()
- {
- $ordersCollection = Mage::getModel('custom/table')->getCollection();
- Mage::getSingleton('core/resource_iterator')->walk($ordersCollection->getSelect(),
- array(array($this, 'orderCallback'))
- );
- }
- public function orderCallback($args)
- {
- return $args['row'];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement