protected function innerGet($key) { $value = parent::innerGet($key); if ($value instanceof Config) { $value = Driver::instance($value); $this->key = $value; } return $value; }
public function __construct($data = null, $simple = false) { if (null !== $data) { if (is_array($data)) { parent::__construct($data); } else { $this->fromString((string) $data, $simple); } } }
public function __construct($data = null) { if (null !== $data) { parent::__construct($data); } else { $arguments = array_slice($_SERVER['argv'], 1); $this->command = array_shift($arguments); $this->arguments = $arguments; $options = $this->parseOptions($this->arguments); $this->options = $options ? new self($options) : []; } }
/** * Query constructor. * @param array|string $data */ public function __construct($data = []) { if (is_string($data)) { $this->string = $data; return; } if ($data instanceof IArrayable) { $data = $data->toArrayRecursive(); } if (isset($data['action'])) { $this->action = $data['action']; unset($data['action']); } if (isset($data['columns'])) { $this->columns($data['columns']); unset($data['columns']); } if (isset($data['tables'])) { $this->tables($data['tables']); unset($data['tables']); } if (isset($data['joins'])) { $this->joins($data['joins']); unset($data['joins']); } if (isset($data['group'])) { $this->group($data['group']); unset($data['group']); } if (isset($data['order'])) { $this->order($data['order']); unset($data['order']); } if (isset($data['values'])) { $this->values($data['values']); unset($data['values']); } if (isset($data['params'])) { $this->params($data['params']); unset($data['params']); } parent::__construct($data); }
protected function innerGet($key) { if ('path' == $key) { return $this->__data['path']; } else { return parent::innerGet($key); } }