ArrayNode::addElement()

addElement(Node $value, Node $key = null) Parameters Node $value Node $key

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

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)

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

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::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::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

ArrayInput

class ArrayInput extends Input ArrayInput represents an input provided as an array. Usage: $input = new ArrayInput(array('name' => 'foo', '--bar' => 'foobar')); Methods __construct(array $parameters, InputDefinition $definition = null) Constructor. bind(InputDefinition $definition) Binds the current Input instance with the given arguments and options. from Input validate() Validates the input. from Input bool isInteractive() Is this input means interactive? from Inpu

ArrayInput::getFirstArgument()

string getFirstArgument() Returns the first argument from the raw parameters (not parsed). Return Value string The value of the first argument or null otherwise