public function __construct(API $base) { parent::__construct($base); if (!class_exists('PDO')) { throw new CoreException('PDO is not installed, but it is required'); } }
public function __construct(API $base, $number) { parent::__construct($base); $parts = self::validate($number); $this->country_code = $parts[self::RE_PHONE_PART_COUNTRY_CODE]; $this->operator_code = $parts[self::RE_PHONE_PART_OPERATOR_CODE]; $this->number = $parts[self::RE_PHONE_PART_NUMBER]; }
public function __construct(API $base, LayoutDirectory $directory, $filename) { parent::__construct($base); $this->twig = $directory->twig(); try { $this->template = $this->twig->loadTemplate($filename); } catch (\Twig_Error $e) { throw new TemplateException($e); } }
public function __construct(API $base, $path) { parent::__construct($base); if (!@file_exists($path)) { throw new FileIOException($path, FileIOException::FILE_IO_DIRECTORY_NOT_FOUND); } if (!@is_dir($path)) { throw new FileIOException($path, FileIOException::FILE_IO_NOT_A_DIRECTORY); } $this->path = $path; }
public function __construct(API $base, $filename) { parent::__construct($base); $this->filename = $filename; if (!@file_exists($filename)) { throw new FileIOException($filename, FileIOException::FILE_IO_FILE_NOT_FOUND); } if (!@is_readable($filename)) { throw new FileIOException($filename, FileIOException::FILE_IO_ACCESS_DENIED); } $handle = @fopen($filename, 'r'); $this->header = @fgets($handle, 64); @fclose($handle); }
public function __construct(API $base) { parent::__construct($base); switch ($base->frontend()) { case API::FRONTEND_BASIC: $this->get_variables =& $_GET; $this->post_variables =& $_POST; $this->cookie_variables =& $_COOKIE; $this->method = strtolower($_SERVER['REQUEST_METHOD']); $this->path = $_SERVER['REQUEST_URI']; $this->host = $_SERVER['HTTP_HOST']; break; case API::FRONTEND_FASTCGI: // nothing break; } }
public function __construct(API $base, Request $request) { parent::__construct($base); // TODO: FastCGI, heavy refactoring session_start(); $this->request = $request; if (!isset($_SESSION['IP'])) { $_SESSION['IP'] = (string) $request->ip(false); } else { if ($_SESSION['IP'] != (string) $request->ip(false)) { session_unset(); } } $this->logged_in = false; $this->login_callback = array($this, 'loginDefault'); if (@$_SESSION['SPINDASH_LOGGED_IN'] == 'yes') { $this->logged_in = true; $this->username = @$_SESSION['SPINDASH_USERNAME']; } }
public function __construct(API $base) { parent::__construct($base); }
public function __construct(API $base, $username, $password) { parent::__construct($base); $this->username = $username; $this->password = $password; }
public function __construct(API $base, $address = NULL) { parent::__construct($base); }
public function __construct(API $base, $api_key = NULL) { parent::__construct($base); $this->api_key = $api_key; }
public function __construct($key_prefix, API $base) { parent::__construct($base); $this->key_prefix = $key_prefix; }