예제 #1
0
파일: Language.php 프로젝트: rendix2/QW_MVS
 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);
 }
예제 #2
0
파일: Triangle.php 프로젝트: rendix2/QW_MVS
 public function __construct(Point $pointA, Point $pointB, Point $pointC)
 {
     parent::__construct();
     $this->pointA = $pointA;
     $this->pointB = $pointB;
     $this->pointC = $pointC;
 }
예제 #3
0
파일: Matrix.php 프로젝트: rendix2/QW_MVS
 public function __construct(array $matrix, $debug = FALSE)
 {
     parent::__construct();
     $this->matrix = $matrix;
     $this->matrixSizeA = count($this->matrix);
     $this->matrixSizeB = count($this->matrix[0]);
 }
예제 #4
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();
     }
 }
예제 #5
0
파일: Integer.php 프로젝트: rendix2/QW_MVS
 public function __construct($integer)
 {
     parent::__construct();
     if (!Validator::isInt($integer)) {
         throw new IllegalArgumentException();
     }
     $this->integer = $integer;
 }
예제 #6
0
파일: Color.php 프로젝트: rendix2/QW_MVS
 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;
 }
예제 #7
0
파일: Boolean.php 프로젝트: rendix2/QW_MVS
 public function __construct($boolean)
 {
     parent::__construct();
     if (!Validator::isBool($boolean)) {
         throw new IllegalArgumentException();
     }
     $this->boolean = $boolean;
 }
예제 #8
0
 public function __construct($char = '')
 {
     parent::__construct();
     if (!Validator::isChar($char)) {
         throw new IllegalArgumentException();
     }
     $this->char = $char;
 }
예제 #9
0
 public function __construct(Matrix $matrix)
 {
     parent::__construct();
     if (!$this->matrix->isSquare()) {
         throw new IllegalArgumentException();
     }
     $this->matrix = $matrix;
 }
예제 #10
0
 public function __construct(array $data, $pattern, $debug = FALSE)
 {
     parent::__construct();
     $this->data = $data;
     $this->length = count($this->data);
     $this->pattern = $pattern;
     $this->search();
 }
예제 #11
0
파일: Double.php 프로젝트: rendix2/QW_MVS
 public function __construct($double = 0.0)
 {
     parent::__construct();
     if (!Validator::isDouble($double)) {
         throw new IllegalArgumentException();
     }
     $this->double = $double;
 }
예제 #12
0
 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());
 }
예제 #13
0
 public function __construct($string, $pattern)
 {
     parent::__construct();
     if (!is_string($string)) {
         throw new IllegalArgumentException();
     }
     $this->string = new StringW($string);
     $this->pattern = new StringW($pattern);
 }
예제 #14
0
파일: Point.php 프로젝트: rendix2/QW_MVS
 public function __construct($x, $y)
 {
     parent::__construct();
     if (!Validator::isNumber($x) || !Validator::isNumber($y)) {
         throw new IllegalArgumentException();
     }
     $this->x = $x;
     $this->y = $y;
 }
예제 #15
0
 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();
 }
예제 #16
0
파일: Images.php 프로젝트: rendix2/QW_MVS
 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;
 }
예제 #17
0
파일: StringW.php 프로젝트: rendix2/QW_MVS
 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];
 }
예제 #18
0
 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;
 }
예제 #19
0
파일: Square.php 프로젝트: rendix2/QW_MVS
 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;
 }
예제 #20
0
 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;
 }
예제 #21
0
 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;
 }
예제 #22
0
 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);
 }
예제 #23
0
파일: Mail.php 프로젝트: rendix2/QW_MVS
 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);
     }
 }
예제 #24
0
파일: File.php 프로젝트: rendix2/QW_MVS
 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;
 }
예제 #25
0
파일: Logger.php 프로젝트: rendix2/QW_MVS
 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);
 }
예제 #26
0
 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;
 }
예제 #27
0
파일: SafeForm.php 프로젝트: rendix2/QW_MVS
 public function __construct()
 {
     parent::__construct();
     $this->hash = Hash::r();
 }
예제 #28
0
 public function __construct($realPart, $imaginaryPart)
 {
     parent::__construct();
     $this->real = $realPart;
     $this->imaginary = $imaginaryPart;
 }
예제 #29
0
파일: Comments.php 프로젝트: rendix2/QW_MVS
 public function __construct()
 {
     parent::__construct();
 }
예제 #30
0
 public function __construct()
 {
     parent::__construct();
     $this->pathToTemplate = self::PATH_TO_TEMPLATES . self::USER_DIR_NAME . 'Default' . self::SLASH;
     $this->pageName = "";
 }