/** * Get sub-Input * * @param string $key Name of index or input-name-encoded array selection, e.g. a.b.c * @return InputInterface Sub-Registry or empty array() added to tree if not existing */ public function subTree($key) { $subTree = parent::subTree($key); if ($subTree instanceof self) { $subTree->srcGpc = $this->srcGpc; } return $subTree; }
/** * Gets a param value * * @param string|string[] $key Name of index or array of names of indexes, each with name or input-name-encoded array selection, e.g. a.b.c * @param mixed|GetterInterface $default [optional] Default value, or, if instanceof GetterInterface, parent GetterInterface for the default value * @param string|array $type [optional] default: null: raw. Or const int GetterInterface::COMMAND|GetterInterface::INT|... or array( const ) or array( $key => const ) * @return string|array * * @throws \InvalidArgumentException If namespace doesn't exist */ public function get($key, $default = null, $type = null) { $value = parent::get($key, $default, $type); // cbParamsBase B/C compatibility trick: if (is_array($default) && !is_array($value)) { $value = explode('|*|', $value); } return $value; }