예제 #1
0
 /**
  * Initialization default variables
  *
  * @throws SagepayApiException
  */
 public function __construct()
 {
     if (!defined('CLIENT_EXEC')) {
         throw new SagepayApiException('No direct script access.');
     }
     $this->dbHelper = HelperDatabase::getInstance();
 }
예제 #2
0
 /**
  * Application Constructor
  *
  * @param SagepaySettings $config Sagepay configuration object
  */
 public function __construct(SagepaySettings $config = null)
 {
     $this->_db = HelperDatabase::getInstance();
     $this->_config = $config;
     $pathinfo = isset($_SERVER['PATH_INFO']) ? substr($_SERVER['PATH_INFO'], 1) : (isset($_SERVER['ORIG_PATH_INFO']) ? substr($_SERVER['ORIG_PATH_INFO'], 1) : '');
     $path = explode('/', $pathinfo);
     $getController = isset($path[0]) ? $path[0] : null;
     $controller = $this->_createNameAlias($getController);
     $getAction = isset($path[1]) ? $path[1] : null;
     $action = $this->_createNameAlias($getAction);
     $this->_view($controller, $action);
 }
예제 #3
0
 /**
  * Constructor for ModelAbstract
  */
 public function __construct()
 {
     $this->dbHelper = HelperDatabase::getInstance();
 }