/** * Initialization default variables * * @throws SagepayApiException */ public function __construct() { if (!defined('CLIENT_EXEC')) { throw new SagepayApiException('No direct script access.'); } $this->dbHelper = HelperDatabase::getInstance(); }
/** * 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); }
/** * Constructor for ModelAbstract */ public function __construct() { $this->dbHelper = HelperDatabase::getInstance(); }