ArrayNode::addChild()

addChild(NodeInterface $node) Adds a child node. Parameters NodeInterface $node The child node to add Exceptions InvalidArgumentException when the child node has no name InvalidArgumentException when the child node's name is not unique

ArrayNode

class ArrayNode extends Node Properties $nodes from Node $attributes from Node Methods __construct() Constructor. __toString() from Node compile(Compiler $compiler) Compiles the node to PHP. evaluate($functions, $values) addElement(Node $value, Node $key = null) Details __construct() Constructor. __toString() compile(Compiler $compiler)

ArrayNode

class ArrayNode extends BaseNode implements PrototypeNodeInterface Represents an Array node in the config tree. Methods __construct(string $name, NodeInterface $parent = null) Constructor. from BaseNode setAttribute($key, $value) from BaseNode getAttribute($key, $default = null) from BaseNode hasAttribute($key) from BaseNode getAttributes() from BaseNode setAttributes(array $attributes) from BaseNode removeAttribute($key) from BaseNode setInfo(string $in

ArrayLoader

class ArrayLoader implements LoaderInterface ArrayLoader loads translations from a PHP array. Methods MessageCatalogue load(mixed $resource, string $locale, string $domain = 'messages') Loads a locale. Details MessageCatalogue load(mixed $resource, string $locale, string $domain = 'messages') Loads a locale. Parameters mixed $resource A resource string $locale A locale string $domain The domain Return Value MessageCatalogue A MessageCatalogue

ArrayKeyChoiceList deprecated::toArrayKey()

static int|string toArrayKey(mixed $choice) Casts the given choice to an array key. PHP arrays accept only strings and integers as array keys. Integer strings such as "42" are automatically cast to integers. The boolean values "true" and "false" are cast to the integers 1 and 0. Every other scalar value is cast to a string. Parameters mixed $choice The choice Return Value int|string The choice as PHP array key Exceptions InvalidArgumentException If the choice is not

ArrayKeyChoiceList deprecated::getValuesForChoices()

string[] getValuesForChoices(array $choices) Returns the values corresponding to the given choices. The values are returned with the same keys and in the same order as the corresponding choices in the given array. Parameters array $choices An array of choices. Non-existing choices in this array are ignored Return Value string[] An array of choice values

ArrayKeyChoiceList deprecated::getChoicesForValues()

array getChoicesForValues(array $values) Returns the choices corresponding to the given values. The choices are returned with the same keys and in the same order as the corresponding values in the given array. Parameters array $values An array of choice values. Non-existing values in this array are ignored Return Value array An array of choices

ArrayKeyChoiceList deprecated

class ArrayKeyChoiceList extends ArrayChoiceList deprecated since version 2.8, to be removed in 3.0. Use ArrayChoiceList instead. A list of choices that can be stored in the keys of a PHP array. PHP arrays accept only strings and integers as array keys. Other scalar types are cast to integers and strings according to the description of {@link toArrayKey()}. This implementation applies the same casting rules for the choices passed to the constructor and to {@link getValuesForChoices()}. B

ArrayInput::hasParameterOption()

bool hasParameterOption(string|array $values, bool $onlyParams = false) Returns true if the raw parameters (not parsed) contain a value. This method is to be used to introspect the input parameters before they have been validated. It must be used carefully. Parameters string|array $values The values to look for in the raw parameters (can be an array) bool $onlyParams Only check real parameters, skip those following an end of options (--) signal Return Value bool true if the val

ArrayInput::getParameterOption()

mixed getParameterOption(string|array $values, mixed $default = false, bool $onlyParams = false) Returns the value of a raw option (not parsed). This method is to be used to introspect the input parameters before they have been validated. It must be used carefully. Parameters string|array $values The value(s) to look for in the raw parameters (can be an array) mixed $default The default value to return if no result is found bool $onlyParams Only check real parameters, skip thos