/** * @since 2.0.12 changed return value * * {@inheritDoc} */ public function set($id, $value) { if ($this->isWritable()) { $this->writable->set($id, $value); return $this->writable->has($id); } else { throw new LogicException(Message::get(Message::CONFIG_NOT_WRITABLE, $id), Message::CONFIG_NOT_WRITABLE); } }
/** * throw exception if current $error_type is to throw exception * * {@inheritDoc} */ protected function resolveUnknown($name) { // warn if reference unknown $this->throwError(Message::get(Message::CONFIG_REFERENCE_UNKNOWN, $name), Message::CONFIG_REFERENCE_UNKNOWN); return null; }
/** * Build search directories * * @param string $env * @return array * @access protected */ protected function buildSearchDirs($env) { $path = $this->root_dir; $part = preg_split('/[\\/\\\\]/', trim($env, '/\\'), 0, \PREG_SPLIT_NO_EMPTY); $subdirs = [$path]; foreach ($part as $dir) { $path .= $dir . \DIRECTORY_SEPARATOR; if (false === file_exists($path)) { trigger_error(Message::get(Message::CONFIG_ENV_UNKNOWN, $env), \E_USER_WARNING); break; } $subdirs[] = $path; } return $subdirs; }