Ejemplo n.º 1
0
 function getPlayerParams(ResourceAbstractFile $media)
 {
     $method = 'get' . $this->getDi()->config->get('video_player', 'Flowplayer') . 'Params';
     if (!method_exists($this, $method)) {
         throw Am_Exception_InternalError(sprintf('Method %s is not defined.', $method));
     }
     return call_user_func(array($this, $method), $media);
 }
Ejemplo n.º 2
0
 public function __construct($user_id)
 {
     $this->user_id = (int) $user_id;
     if ($this->user_id <= 0) {
         throw Am_Exception_InternalError('user_id is not int');
     }
     parent::__construct();
     //$ds->addField("concat(u.name_f, ' ', 'u.name_l)", "name");
     $this->add(new Am_Query_Condition_Field('subusers_parent_id', '=', $this->user_id));
 }
Ejemplo n.º 3
0
 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     switch ($request->getActionName()) {
         case self::RETURN_URL_SUCCESS:
         case self::RETURN_URL_FAIL:
             $log = $this->logRequest($request);
             $transaction = $this->createThanksTransaction($request, $response, $invokeArgs);
             $transaction->setInvoiceLog($log);
             try {
                 $transaction->process();
             } catch (Am_Exception_Paysystem_TransactionAlreadyHandled $e) {
                 // ignore this error, as it happens in "thanks" transaction
                 // we may have received IPN about the payment earlier
             } catch (Exception $e) {
                 throw $e;
                 $this->getDi()->errorLogTable->logException($e);
                 throw Am_Exception_InternalError(___("Error happened during transaction handling. Please contact website administrator"));
             }
             $log->setInvoice($transaction->getInvoice())->update();
             $this->invoice = $transaction->getInvoice();
             $this->invoice->data()->set(self::DPS_BILLING_ID, $transaction->getDpsBillingId())->update();
             $response->setRedirect($this->getReturnUrl());
             break;
         default:
             parent::directAction($request, $response, $invokeArgs);
     }
 }