Beispiel #1
0
 public function __construct(AccessibleArray $ar = null)
 {
     if ($ar == null) {
         return;
     }
     $this->dirname = $ar->string('dirname');
     $this->basename = $ar->string('basename');
     $this->extension = $ar->string('extension');
     $this->filename = $ar->string('filename');
 }
Beispiel #2
0
 /**
  * Parse an INI path
  * @param File $path
  */
 public function __construct(File $path)
 {
     $ar = array();
     if ($path != null && $path->exists() && $path->is_file() && $path->is_readable()) {
         $ar = !parse_ini_file($path->getPath());
     }
     parent::__construct($ar);
 }
Beispiel #3
0
 public function __construct()
 {
     if (!isset($_POST)) {
         throw new NotAnArrayException('$_POST is not a valid array');
     }
     if (!is_array($_POST)) {
         throw new NotAnArrayException('$_POST is not a valid array');
     }
     parent::__construct($_POST);
 }
Beispiel #4
0
 public function __construct()
 {
     $headers = getallheaders();
     if (!isset($headers)) {
         throw new NotAnArrayException('getallheaders() is not a valid array');
     }
     if (!is_array($headers)) {
         throw new NotAnArrayException('getallheaders() is not a valid array');
     }
     parent::__construct($headers);
 }
Beispiel #5
0
 public function __construct($json)
 {
     $util = InstanceHolder::util();
     if ($util->is_json($json)) {
         $j_array = json_decode($json, true);
         parent::__construct($j_array);
         $this->json_error = json_last_error();
         $this->json_error_msg = json_last_error_msg();
     } else {
         parent::__construct(new \stdClass());
     }
 }
Beispiel #6
0
 /**
  * @throws NotAnArrayException
  */
 public function __construct()
 {
     if (!isset($_SESSION) || !is_array($_SESSION)) {
         session_start();
     }
     //Leave these in here just in case
     if (!isset($_SESSION)) {
         throw new NotAnArrayException('$_SERVER is not a valid array');
     }
     if (!is_array($_SESSION)) {
         throw new NotAnArrayException('$_SERVER is not a valid array');
     }
     parent::__construct($_SESSION);
 }
Beispiel #7
0
 public function __construct(AccessibleArray $ar)
 {
     $this->dev = $ar->int('dev');
     $this->ino = $ar->int('ino');
     $this->mode = $ar->int('mode');
     $this->nlink = $ar->int('nlink');
     $this->uid = $ar->int('uid');
     $this->gid = $ar->int('gid');
     $this->rdev = $ar->int('rdev');
     $this->size = $ar->int('size');
     $this->atime = $ar->int('atime');
     $this->mtime = $ar->int('mtime');
     $this->ctime = $ar->int('ctime');
     $this->blksize = $ar->int('blksize');
     $this->blocks = $ar->int('blocks');
 }
Beispiel #8
0
 /**
  * @inheritDoc
  */
 public function offsetUnset($index)
 {
     if ($this->has_column_by_key($index)) {
         $index = $this->get_column_by_key($index);
     }
     parent::offsetUnset($index);
 }