Lines Matching refs:item

675  * @param mixed $item         A variable
682 function twig_slice(Environment $env, $item, $start, $length = null, $preserveKeys = false) argument
684 if ($item instanceof \Traversable) {
685 while ($item instanceof \IteratorAggregate) {
686 $item = $item->getIterator();
689 if ($start >= 0 && $length >= 0 && $item instanceof \Iterator) {
691 …return iterator_to_array(new \LimitIterator($item, $start, null === $length ? -1 : $length), $pres…
697 $item = iterator_to_array($item, $preserveKeys);
700 if (\is_array($item)) {
701 return \array_slice($item, $start, $length, $preserveKeys);
704 return (string) mb_substr((string) $item, $start, $length, $env->getCharset());
710 * @param mixed $item A variable
714 function twig_first(Environment $env, $item) argument
716 $elements = twig_slice($env, $item, 0, 1, false);
724 * @param mixed $item A variable
728 function twig_last(Environment $env, $item) argument
730 $elements = twig_slice($env, $item, -1, 1, false);
871 foreach ($array as $key => $item) {
893 function twig_reverse_filter(Environment $env, $item, $preserveKeys = false) argument
895 if ($item instanceof \Traversable) {
896 return array_reverse(iterator_to_array($item), $preserveKeys);
899 if (\is_array($item)) {
900 return array_reverse($item, $preserveKeys);
903 $string = (string) $item;
966 foreach ($compare as $item) {
967 if ($item === $value) {
972 foreach ($compare as $item) {
973 if ($item == $value) {
1387 * @param mixed $item The item to get from the array or object
1400 function twig_get_attribute(Environment $env, Source $source, $object, $item, array $arguments = []… argument
1404 $arrayItem = \is_bool($item) || \is_float($item) ? (int) $item : $item;
1428 …an object of class "%s" that does not implement ArrayAccess interface.', $item, \get_class($object…
1437 … $message = sprintf('Impossible to access a key ("%s") on a null variable.', $item);
1439 … = sprintf('Impossible to access a key ("%s") on a %s variable ("%s").', $item, \gettype($object),…
1442 … $message = sprintf('Impossible to access an attribute ("%s") on a null variable.', $item);
1444 …ntf('Impossible to access an attribute ("%s") on a %s variable ("%s").', $item, \gettype($object),…
1461 $message = sprintf('Impossible to invoke a method ("%s") on a null variable.', $item);
1463 $message = sprintf('Impossible to invoke a method ("%s") on an array.', $item);
1465 …sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s").', $item, \gettype($object),…
1477 if (isset($object->$item) || \array_key_exists((string) $item, (array) $object)) {
1483 …$env->getExtension(SandboxExtension::class)->checkPropertyAllowed($object, $item, $lineno, $source…
1486 return $object->$item;
1536 if (isset($cache[$class][$item])) {
1537 $method = $cache[$class][$item];
1538 …} elseif (isset($cache[$class][$lcItem = strtr($item, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklm…
1541 $method = $item;
1552 …has%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), $lineno, …