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'); }
/** * 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); }
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); }
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); }
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()); } }
/** * @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); }
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'); }
/** * @inheritDoc */ public function offsetUnset($index) { if ($this->has_column_by_key($index)) { $index = $this->get_column_by_key($index); } parent::offsetUnset($index); }