Example #1
0
 public function __construct($dbhost, $dbuser, $dbpasswd, $dbname)
 {
     if (!extension_loaded('mysqli')) {
         \trigger_error('MySQLi extension not loaded!', E_USER_WARNING);
         $this->_loaded = false;
         return;
     }
     parent::__construct($dbhost, $dbuser, $dbpasswd, $dbname);
 }
 /**
  * Constructor shmDriver
  *
  * @param Translator $translator Translator service
  * @param array      $options    Options driver
  */
 public function __construct($translator, array $options = array())
 {
     parent::__construct($translator, $options);
     $key = ftok(__FILE__, 'm');
     $this->shmId = shm_attach($key, 100, 0666);
     if (!$this->shmId) {
         throw new \RuntimeException('Can\'t allocate shared memory');
     }
     $this->options = $options;
 }
 function applyAction($actionName, $httpVars, $filesVar)
 {
     if ($actionName == "get_ajxp_actions") {
         AJXP_XMLWriter::header();
         $this->sendActionsToClient(false, null, null);
         $authDriver = ConfService::getAuthDriverImpl();
         $authDriver->sendActionsToClient(false, null, null);
         $confDriver = ConfService::getConfStorageImpl();
         $confDriver->sendActionsToClient(false, null, null);
         AJXP_XMLWriter::close();
         exit(1);
     } else {
         parent::applyAction($actionName, $httpVars, $filesVar);
     }
 }
 /**
  * Constructor memCacheDriver
  *
  * @param array $options    Options driver
  */
 public function __construct(array $options = array())
 {
     parent::__construct($options);
     if (!isset($options['key_name'])) {
         throw new \InvalidArgumentException('$options[\'key_name\'] must be defined if Driver Memcache configuration is used');
     }
     if (!isset($options['host'])) {
         throw new \InvalidArgumentException('$options[\'host\'] must be defined if Driver Memcache configuration is used');
     }
     if (!isset($options['port'])) {
         throw new \InvalidArgumentException('$options[\'port\'] must be defined if Driver Memcache configuration is used');
     } elseif (!is_int($options['port'])) {
         throw new \InvalidArgumentException('$options[\'port\'] must be an integer if Driver Memcache configuration is used');
     }
     if (null !== $options) {
         $this->keyName = $options['key_name'];
         $this->memcacheInstance = new \Memcache();
         $this->memcacheInstance->connect($options['host'], $options['port']);
     }
     $this->options = $options;
 }
Example #5
0
 /**
  * Cloning an image
  */
 public function __clone()
 {
     $this->core = $this->driver->cloneCore($this->core);
 }
 /**
  * Print the XML for actions
  *
  * @param boolean $filterByRight
  * @param User $user
  */
 function sendActionsToClient($filterByRight, $user)
 {
     parent::sendActionsToClient($filterByRight, $user, $this->repository);
 }
 /**
  * @return array
  */
 public function __sleep()
 {
     return array_merge(parent::__sleep(), ['_host', '_port', '_timeout', '_useSsl', '_username', '_password']);
 }
		/**
		 * Constructor
		 *
		 * @param string $filename
		 * @ignore 
		 */
		function __construct($filename)
		{
			$this->FileName = $filename;
			parent::__construct();
			
		}
Example #9
0
 /**
  * Cloning an image
  */
 public function __clone()
 {
     $this->container = $this->driver->cloneContainer($this->container);
 }
Example #10
0
 /**
  * @return array
  */
 public function errorInfo()
 {
     return $this->driver->getConnection()->errorInfo();
 }
Example #11
0
 function __construct($host = "127.0.0.1", $port = 11211)
 {
     parent::__construct();
     $this->_memcached = new \Memcached();
     $this->init($host, $port);
 }
Example #12
0
 /**
  * LocalAdapter constructor.
  *
  * @param array|null $driverConfig
  */
 public function __construct($driverConfig = [])
 {
     parent::__construct($driverConfig);
     $this->directorySeparator = DIRECTORY_SEPARATOR;
 }
 function replaceAjxpXmlKeywords($xml)
 {
     $xml = parent::replaceAjxpXmlKeywords($xml);
     $loginRedirect = $this->getLoginRedirect();
     $xml = str_replace("AJXP_LOGIN_REDIRECT", $loginRedirect !== false ? "'" . $loginRedirect . "'" : "false", $xml);
     $xml = str_replace("AJXP_REMOTE_AUTH", "false", $xml);
     $xml = str_replace("AJXP_NOT_REMOTE_AUTH", "true", $xml);
     return $xml;
 }