public static function getInstance($action, $customer) { if (!self::$_actions) { self::$_actions = Mage::getConfig()->getNode('points_actions'); } if ($action == 'an_customer_subscription' && !self::$_actions->{$action}) { $action = 'customer_subscription'; } if (!self::$_actions->{$action}) { throw new AW_Core_Exception('Cannot find instance for action'); } $instance = Mage::getModel(self::$_actions->{$action}); if (!$instance instanceof AW_Points_Model_Actions_Abstract) { throw new Exception('Cannot find instance for action'); } return $instance->setSummary(Mage::getModel('points/summary')->loadByCustomer($customer)); }