protected function postProcessActionInvocation($controllerObject, ReflectionMethod $method, array $arguements, Customweb_DependencyInjection_IContainer $container) { if ($container->hasBean('Customweb_Payment_Authorization_ITransaction')) { $transaction = $container->getBean('Customweb_Payment_Authorization_ITransaction'); $this->getTransactionHandler()->persistTransactionObject($transaction); } }
/** * @param Customweb_Asset_IResolver $assetResolver * @param Customweb_DependencyInjection_IContainer $container */ public function __construct(Customweb_Asset_IResolver $assetResolver, Customweb_DependencyInjection_IContainer $container) { $this->assetResolver = $assetResolver; if ($container->hasBean('Customweb_Cache_IBackend')) { $this->cacheBackend = $container->getBean('Customweb_Cache_IBackend'); } }
/** * Removes the given alias from the database. In case it can be also removed on the remote system it will be also * removed their. * * @param int $transactionId * @throws Exception */ public function removeAlias($transactionId) { $transaction = $this->manager->fetch($this->transactionClassName, $transactionId); if (!$transaction instanceof Customweb_Payment_Entity_AbstractTransaction) { throw new Exception("Transaction must be of type Customweb_Payment_Entity_AbstractTransaction"); } $this->deactivateAlias($transactionId); if ($this->container->hasBean('Customweb_Payment_Alias_IRemoveAdapter')) { $removeAdapter = $this->container->getBean('Customweb_Payment_Alias_IRemoveAdapter'); if (!$removeAdapter instanceof Customweb_Payment_Alias_IRemoveAdapter) { throw new Exception("Remove adapter must be of type 'Customweb_Payment_Alias_IRemoveAdapter'"); } $removeAdapter->remove($transaction->getTransactionObject()); $this->manager->persist($transaction); } }
public function hasBean($identifier) { return $this->container->hasBean($identifier); }