/** * Get inputs of the route. * * @return Collection */ public function getInputs() { $inputs = $this->settings->get('inputs'); if (is_array($inputs) && count($inputs)) { return new Collection($inputs); } else { return new Collection(array()); } }
/** * Input construct. * * @param array $name * @param mixed $value * @param array|null $inputConfig * @throws InvalidArgumentException */ public function __construct($name, $value, $inputConfig) { if (is_null($name) || !is_string($name) || ($name = trim($name)) === '') { throw new InvalidArgumentException(''); } $this->name = $name; $this->value = $value; if (!is_array($inputConfig)) { $inputConfig = array(); } parent::__construct($inputConfig); }
/** * Retrieve a single derived request attribute. * * Retrieves a single derived request attribute as described in * getAttributes(). If the attribute has not been previously set, returns * the default value as provided. * * This method obviates the need for a hasAttribute() method, as it allows * specifying a default value to return if the attribute is not found. * * @see getAttributes() * @param string $name The attribute name. * @param mixed $default Default value to return if the attribute does not exist. * @return mixed */ public function getAttribute($name, $default = null) { return $this->attributes->get($name, $default); }
/** * Clear the output. */ public function clearOutputs() { $this->outputs->clear(); }
/** * Remove a value from the collection. * * @param string $key The data key */ public function remove($key) { parent::remove($this->normalizeKey($key)); }