public function __construct($langName) { parent::__construct(); if (!preg_match('#^[A-Z]*$#', $langName)) { throw new IllegalArgumentException(); } foreach (glob(self::PATH . '*') as $languages) { $this->allPackages[] = $languages; } $this->langName = $langName; // we don't have any other languages yet if ($this->langName != 'CZ') { $this->langName = 'CZ'; } if (!file_exists(self::PATH . $this->langName)) { throw new LanguageException('Neexistující celý jazykový balíček: <strong>' . $this->langName . '</strong>.'); } if (!file_exists(self::PATH . $this->langName . self::PREFIX_NAME . $this->langName . self::EXT)) { throw new LanguageException('Neexistující jazykový balíček: <strong>' . $langName . '</strong>.'); } if (!file_exists(self::PATH . $this->langName . self::PREFIX_NAME_META . $this->langName . self::EXT)) { throw new LanguageException('Neexistující jazykový balíček meta dat: <strong>' . $langName . '</strong>.'); } $this->lang = parse_ini_file(self::PATH . $this->langName . self::PREFIX_NAME . $this->langName . self::EXT); $this->meta = parse_ini_file(self::PATH . $this->langName . self::PREFIX_NAME_META . $this->langName . self::EXT); }
public function __construct(Point $pointA, Point $pointB, Point $pointC) { parent::__construct(); $this->pointA = $pointA; $this->pointB = $pointB; $this->pointC = $pointC; }
public function __construct(array $matrix, $debug = FALSE) { parent::__construct(); $this->matrix = $matrix; $this->matrixSizeA = count($this->matrix); $this->matrixSizeB = count($this->matrix[0]); }
public function __construct($host, $userName, $userPassword, $dbName, array $options, $log = FALSE, $connectEveryQuery = FALSE, $connectOnCreate = FALSE) { parent::__construct(); self::$AllQueryCount = 0; self::$AllConnectionsCount = 0; $this->host = $host; $this->userName = $userName; $this->userPassword = $userPassword; $this->dbName = $dbName; $this->options = $options; $this->queryCount = 0; $this->statement = NULL; $this->connection = NULL; // if (!is_bool($log)) { $log = FALSE; } if (!is_bool($connectEveryQuery)) { $this->connectEveryQuery = FALSE; } if (!is_bool($connectOnCreate)) { $this->connectOnCreate = FALSE; } if ($log) { $this->log = new Logger(Logger::LOG_TYPE_DATABASE); } if ($this->connectOnCreate ^ $this->connectEveryQuery) { throw new IllegalArgumentException(); } $this->connectEveryQuery = $connectEveryQuery; if ($this->connectOnCreate = TRUE) { $this->connect(); } }
public function __construct($integer) { parent::__construct(); if (!Validator::isInt($integer)) { throw new IllegalArgumentException(); } $this->integer = $integer; }
public function __construct($red = 0, $green = 0, $blue = 0) { parent::__construct(); self::checkColor($red, $green, $blue); $this->red = $red; $this->green = $green; $this->blue = $blue; }
public function __construct($boolean) { parent::__construct(); if (!Validator::isBool($boolean)) { throw new IllegalArgumentException(); } $this->boolean = $boolean; }
public function __construct($char = '') { parent::__construct(); if (!Validator::isChar($char)) { throw new IllegalArgumentException(); } $this->char = $char; }
public function __construct(Matrix $matrix) { parent::__construct(); if (!$this->matrix->isSquare()) { throw new IllegalArgumentException(); } $this->matrix = $matrix; }
public function __construct(array $data, $pattern, $debug = FALSE) { parent::__construct(); $this->data = $data; $this->length = count($this->data); $this->pattern = $pattern; $this->search(); }
public function __construct($double = 0.0) { parent::__construct(); if (!Validator::isDouble($double)) { throw new IllegalArgumentException(); } $this->double = $double; }
public function __construct($name) { parent::__construct(); $c = self::BACKSLASH . 'QW' . self::BACKSLASH . 'Models' . self::BACKSLASH . $name . 'Model'; //$this->view = new SmartyView(); $this->view = new BasicView(); $this->model = new $c(); $this->viewName = str_replace('Controller', '', $this->getClassName()); }
public function __construct($string, $pattern) { parent::__construct(); if (!is_string($string)) { throw new IllegalArgumentException(); } $this->string = new StringW($string); $this->pattern = new StringW($pattern); }
public function __construct($x, $y) { parent::__construct(); if (!Validator::isNumber($x) || !Validator::isNumber($y)) { throw new IllegalArgumentException(); } $this->x = $x; $this->y = $y; }
public function __construct() { parent::__construct(); require_once './QW/FW/Boot/Exceptions.php'; //self::$logger = new Logger( Logger::LOG_TYPE_GLOBAL, $debug ); // $this->setAllDebug( ); //require_once( './QW/FW/Boot/Exceptions.php' ); require_once './QW/Smarty/libs/Smarty.class.php'; $this->route(); }
public function __construct($width, $height, $trueColor = FALSE) { parent::__construct(); if (!Validator::isNumber($width) || !Validator::isNumber($height)) { throw new IllegalArgumentException(); } $this->imageResource = $trueColor == TRUE ? imagecreatetruecolor($width, $height) : imagecreate($width, $height); $this->height = $height; $this->width = $width; }
public function __construct($string = "") { parent::__construct(); if (!Validator::isString($string)) { throw new IllegalArgumentException(); } $this->string = (string) $string; $this->matches = NULL; $this->length = mb_strlen($this->string, self::UTF8); self::$separators = ["\n", "\r", "\r\n", "\n\r", chr(30), chr(155), PHP_EOL]; }
public function __construct($method = 'post', $action = '', $name = '') { parent::__construct(); $this->csfrCheckName = Hash::r(); $this->csfrCheckValue = Hash::r3(); $this->action = $action; $this->method = $method; $this->formData[] = '<form method="' . $this->method . '" action="' . $this->action . '" name="' . $name . '">'; $this->formData[] = '<input type="hidden" name="' . $this->csfrCheckName . '" value="' . $this->csfrCheckValue . '">'; $this->select = NULL; }
public function __construct(Point $pointLefUp, $length) { parent::__construct(); if (!Validator::isNumber($length)) { throw new IllegalArgumentException(); } $this->pointLeftUp = $pointLefUp; $this->pointLeftDown = new Point($this->pointLeftUp->getX(), $this->pointLeftUp->getY() - $length); $this->pointRightDown = new Point($this->pointLeftUp->getX() + $length, $this->pointLeftUp->getY() - $length); $this->pointRightUp = new Point($this->pointLeftUp->getX(), $this->pointLeftUp->getY() + $length); $this->length = $length; }
public function __construct(FormCreatorHTML4 $formCreatorHTML4, $name, $multiple, $size, $disabled) { parent::__construct(); $this->formCreatorHTML4 = $formCreatorHTML4; $this->content = []; $this->objectsCounter = $name; $this->multiple = $multiple == TRUE ? 'multiple="multiple' : ''; if (!is_numeric($size)) { throw new IllegalArgumentException(); } $this->size = $size; }
public function __construct(array $data) { parent::__construct(); if ($this->length == 1) { return $this->originalData; } $this->originalData = $data; $this->length = count($this->originalData); $this->sort($this); //$this->sortedData = $this->originalData; $this->originalData = $data; }
public function __construct($width = 400, $height = 200) { parent::__construct(); if (!Validator::isNumber($width) || Validator::isNumber($height)) { throw new IllegalArgumentException(); } $this->captcha = new Images($width, $height); $this->captcha->setBackgroundColor(new Color(0, 0, 0)); $this->captcha->setTextColor(new Color(255, 255, 255)); $string = new StringW(Hash::r()); $this->text = $string->subString(0, Math::randomInterval(6, 8)); $this->captcha->setText(Math::randomInterval(2, 6), new Point(0, 0), $string, FALSE); }
public function __construct($to = '', $subject = '', $text = '') { parent::__construct(); if (!Validator::isEmpty($to)) { $this->setTo($to); } if (!Validator::isEmpty($subject)) { $this->setSubject($subject); } if (!Validator::isEmpty($text)) { $this->setText($text); } }
public function __construct($filePath, $create = FALSE) { parent::__construct(); if (!Validator::isFile($filePath)) { throw new IllegalArgumentException(); } if (!self::fileExists($filePath)) { if ($create == TRUE) { self::touch($filePath); } else { throw new IllegalArgumentException(); } } $this->filePath = $filePath; }
public function __construct($type) { parent::__construct(); $this->path = self::PATH; switch ($type) { case self::LOG_TYPE_GLOBAL: $this->path .= self::PATH_GLOBAL; break; case self::LOG_TYPE_DATABASE: $this->path .= self::PATH_DATABASE; break; case self::LOG_TYPE_FILE: $this->path .= self::PATH_FILE; break; default: throw new IllegalArgumentException(); } $this->file = new File($this->path, TRUE); }
public function __construct($ip, $safeMode = TRUE) { parent::__construct(); if ($ip == NULL) { $ip = Server::get('remote_addr'); } if (!self::isIP($ip)) { throw new IllegalArgumentException(); } if (!Validator::isBool($safeMode)) { throw new IllegalArgumentException(); } if (self::isIPv4($ip)) { $this->ipCoded = ip2long($ip); $this->ipParted = explode('.', $ip); } else { $this->ipCoded = self::ip6pack($ip); $this->ipParted = explode(':', $ip); } $this->ipCountPart = count($this->ipParted); $this->safeMode = $safeMode; }
public function __construct() { parent::__construct(); $this->hash = Hash::r(); }
public function __construct($realPart, $imaginaryPart) { parent::__construct(); $this->real = $realPart; $this->imaginary = $imaginaryPart; }
public function __construct() { parent::__construct(); }
public function __construct() { parent::__construct(); $this->pathToTemplate = self::PATH_TO_TEMPLATES . self::USER_DIR_NAME . 'Default' . self::SLASH; $this->pageName = ""; }