public function __construct(bmApplication $application, $parameters = array()) { parent::__construct($application, $parameters); $this->lastString = ' echo "\\n";'; $this->logFile = projectRoot . 'logs/api.php'; $this->isLogMode = false; }
public function __construct($application, $parameters = array()) { parent::__construct($application, $parameters); if ($this->{$tableName} != '') { $this->initialize(); } }
public function __construct($application, $parameters = array()) { parent::__construct($application, $parameters); $this->stemCache = $this->application->cacheLink->get('stemCache'); if ($this->stemCache === false) { $this->stemCache = array(); } }
/** * Конструктор класса * * @param bmApplication $application экземпляр текущего приложения * @param array $parameters параметры, необходимые для инициализации класса * @return bmCacheLink */ public function __construct($application, $parameters = array()) { parent::__construct($application, $parameters); $this->cacherExists = function_exists('session_start'); if ($this->cacherExists) { session_start(); } }
/** * Конструктор класса * * @param bmApplication $application экземпляр текущего приложения * @param array $parameters параметры, необходимые для инициализации класса * @return bmCacheLink */ public function __construct($application, $parameters = array()) { parent::__construct($application, $parameters); $redis = new Redis(); $connectResult = $redis->pconnect('localhost'); if ($connectResult) { $this->cacher = $redis; } }
public function __construct($application, $parameters = array()) { parent::__construct($application, $parameters); $this->routes = $application->cacheLink->get(C_CACHE_PREFIX . 'sitePages'); if ($this->routes == false) { require_once projectRoot . '/conf/generator.conf'; $application->cacheLink->set(C_CACHE_PREFIX . 'sitePages', $this->routes); } }
/** * Конструктор класса * * @param bmApplication $application экземпляр текущего приложения * @param array $parameters параметры, необходимые для инициализации класса * @return bmCacheLink */ public function __construct($application, $parameters = array()) { parent::__construct($application, $parameters); $fileName = projectRoot . '/conf/cache_' . $this->className . '.conf'; if (!file_exists($fileName)) { $fileName = projectRoot . '/conf/cache_default.conf'; } require $fileName; $className = $this->className; $this->cacherObject = new $className($this->application, array('prefix' => $this->prefix)); }
public function __construct($application, $parameters = array()) { parent::__construct($application, $parameters); global $argv; $this->runmodes = array('no-daemon' => false, 'help' => false, 'write-initd' => false); foreach ($argv as $argument) { if (substr($argument, 0, 2) == '--' && isset($this->runmodes[substr($argument, 2)])) { $this->runmodes[substr($argument, 2)] = true; } } $this->options = array('appName' => '', 'appDir' => dirname($_SERVER['PHP_SELF']), 'appDescription' => '', 'authorName' => '', 'authorEmail' => '', 'sysMaxExecutionTime' => '0', 'sysMaxInputTime' => '0', 'sysMemoryLimit' => '10M', 'appRunAsGID' => 1000, 'appRunAsUID' => 1000); foreach ($parameters as $name => $value) { if (array_key_exists($name, $this->options)) { $this->options[$name] = $value; } else { $this->ownOptions[$name] = $value; } } }
public function __construct($application, $parameters = array()) { parent::__construct($application, $parameters); $this->returnTo = array_key_exists('returnTo', $parameters) ? $parameters['returnTo'] : $this->application->cgi->getReferer('returnTo', ''); }
public function __get($propertyName) { $this->checkDirty(); $result = parent::__get($propertyName); if (array_key_exists($propertyName, $this->map)) { switch ($this->map[$propertyName]['dataType']) { case BM_VT_DATETIME: return $result; break; default: return $result; break; } } if (isset($result)) { return $result; } }
/** * Конструктор класса * * @param bmApplication $application экземпляр текущего приложения * @param array $parameters параметры, необходимые для инициализации класса * * */ public function __construct($application, $parameters = array()) { parent::__construct($application, $parameters); $this->cacherExists = function_exists('xcache_isset'); }
/** * Конструктор * * @param bmApplication $application экземпляр класса текущего приложения * @param $parameters параметры */ public function __construct($application, $parameters = array()) { parent::__construct($application, $parameters); require_once projectRoot . '/locale/' . $application->locale . '/error_messages.php'; }
public function __construct($application, $parameters = array()) { parent::__construct($application, $parameters); $this->connect(); }
public function __get($propertyName) { switch ($propertyName) { case 'dataObjectMapIds': if (!array_key_exists('dataObjectMapIds', $this->properties)) { $this->properties['dataObjectMapIds'] = $this->applicationCache->getDataObjectMaps($this, false); } return $this->properties['dataObjectMapIds']; break; case 'dataObjectMaps': return $this->applicationCache->getDataObjectMaps($this); break; default: $className = 'bm' . ucfirst($propertyName); if (class_exists($className)) { if (!$this->propertyExists($propertyName)) { $this->addProperty($propertyName, new $className($this)); } } return parent::__get($propertyName); break; } }
public function __construct($application, &$parameters = array()) { parent::__construct($application, $parameters); require_once projectRoot . 'conf/contentProvider.conf'; }
public function __construct($application, $parameters = array()) { $this->cacher = new Memcache(); $this->cacher->connect('localhost', 21201); parent::__construct($application, $parameters); }