class_LocalPaymentDiscovery.php

Go to the documentation of this file.
00001 <?php
00026 class LocalPaymentDiscovery extends BaseDiscovery implements Discoverable, Registerable {
00032         protected function __construct () {
00033                 // Call parent constructor
00034                 parent::__construct(__CLASS__);
00035 
00036                 // Clean up a little
00037                 $this->removeNumberFormaters();
00038                 $this->removeSystemArray();
00039         }
00040 
00047         public final static function createLocalPaymentDiscovery (Filterable $filterInstance) {
00048                 // Get an instance of this class
00049                 $discoveryInstance = new LocalPaymentDiscovery();
00050 
00051                 // Set the action from filter
00052                 $discoveryInstance->setActionName($filterInstance->getActionName());
00053 
00054                 // Return the prepared instance
00055                 return $discoveryInstance;
00056         }
00057 
00064         public function discover (Requestable $requestInstance) {
00065                 // Now get a search criteria and set app name and payment action as search critera
00066                 $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
00067                 $criteriaInstance->addCriteria("app_name", $requestInstance->getRequestElement('app'));
00068                 $criteriaInstance->addCriteria("payment_action", $this->getActionName().'_action');
00069                 $criteriaInstance->setLimit(1);
00070 
00071                 // Get a wrapper instance
00072                 $wrapperInstance = ObjectFactory::createObjectByConfiguredName('payment_db_wrapper_class');
00073 
00074                 // Get result back
00075                 $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
00076 
00077                 // Set the result instance
00078                 $this->setResultInstance($resultInstance);
00079         }
00080 
00088         public function addResultsToHelper (HelpableTemplate $helperInstance) {
00089                 // Undone part
00090         }
00091 }
00092 
00093 // [EOF]
00094 ?>

Generated on Mon Dec 8 01:06:45 2008 for Ship-Simulator by  doxygen 1.5.6