Lines Matching refs:value

423             foreach ($values as $i => $value) {
424 $values[$i] = twig_convert_encoding($value, $charset, 'UTF-8');
576 * @param int|float|string|null $value The value to round
582 function twig_round($value, $precision = 0, $method = 'common') argument
584 $value = (float) $value;
587 return round($value, $precision);
594 return $method($value * 10 ** $precision) / 10 ** $precision;
749 * @param array $value An array
755 function twig_join_filter($value, $glue = '', $and = null) argument
757 if (!twig_test_iterable($value)) {
758 $value = (array) $value;
761 $value = twig_to_array($value, false);
763 if (0 === \count($value)) {
768 return implode($glue, $value);
771 if (1 === \count($value)) {
772 return $value[0];
775 return implode($glue, \array_slice($value, 0, -1)).$and.$value[\count($value) - 1];
793 * @param string|null $value A string
799 function twig_split_filter(Environment $env, $value, $delimiter, $limit = null) argument
801 $value = $value ?? '';
804 return null === $limit ? explode($delimiter, $value) : explode($delimiter, $value, $limit);
808 return preg_split('/(?<!^)(?!$)/u', $value);
811 $length = mb_strlen($value, $env->getCharset());
813 return [$value];
818 $r[] = mb_substr($value, $i, $limit, $env->getCharset());
830 function _twig_default_filter($value, $default = '') argument
832 if (twig_test_empty($value)) {
836 return $value;
951 function twig_in_filter($value, $compare) argument
953 if ($value instanceof Markup) {
954 $value = (string) $value;
961 return \in_array($value, $compare, \is_object($value) || \is_resource($value));
962 … } elseif (\is_string($compare) && (\is_string($value) || \is_int($value) || \is_float($value))) {
963 return '' === $value || false !== strpos($compare, (string) $value);
965 if (\is_object($value) || \is_resource($value)) {
967 if ($item === $value) {
973 if ($item == $value) {
1208 * @param mixed $value A variable
1212 function twig_test_empty($value) argument
1214 if ($value instanceof \Countable) {
1215 return 0 === \count($value);
1218 if ($value instanceof \Traversable) {
1219 return !iterator_count($value);
1222 if (\is_object($value) && method_exists($value, '__toString')) {
1223 return '' === (string) $value;
1226 return '' === $value || false === $value || null === $value || [] === $value;
1237 * @param mixed $value A variable
1241 function twig_test_iterable($value) argument
1243 return $value instanceof \Traversable || \is_array($value);
1499 …$lcMethods = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abc…