vendor/twig/twig/src/Resources/core.php line 351

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of Twig.
  4.  *
  5.  * (c) Fabien Potencier
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. use Twig\Environment;
  11. use Twig\Extension\CoreExtension;
  12. /**
  13.  * @internal
  14.  * @deprecated since Twig 3.9
  15.  */
  16. function twig_cycle($values$position)
  17. {
  18.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  19.     return CoreExtension::cycle($values$position);
  20. }
  21. /**
  22.  * @internal
  23.  * @deprecated since Twig 3.9
  24.  */
  25. function twig_random(Environment $env$values null$max null)
  26. {
  27.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  28.     return CoreExtension::random($env$values$max);
  29. }
  30. /**
  31.  * @internal
  32.  * @deprecated since Twig 3.9
  33.  */
  34. function twig_date_format_filter(Environment $env$date$format null$timezone null)
  35. {
  36.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  37.     return CoreExtension::dateFormatFilter($env$date$format$timezone);
  38. }
  39. /**
  40.  * @internal
  41.  * @deprecated since Twig 3.9
  42.  */
  43. function twig_date_modify_filter(Environment $env$date$modifier)
  44. {
  45.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  46.     return CoreExtension::dateModifyFilter($env$date$modifier);
  47. }
  48. /**
  49.  * @internal
  50.  * @deprecated since Twig 3.9
  51.  */
  52. function twig_sprintf($format, ...$values)
  53. {
  54.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  55.     return CoreExtension::sprintf($format, ...$values);
  56. }
  57. /**
  58.  * @internal
  59.  * @deprecated since Twig 3.9
  60.  */
  61. function twig_date_converter(Environment $env$date null$timezone null)
  62. {
  63.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  64.     return CoreExtension::dateConverter($env$date$timezone);
  65. }
  66. /**
  67.  * @internal
  68.  * @deprecated since Twig 3.9
  69.  */
  70. function twig_replace_filter($str$from)
  71. {
  72.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  73.     return CoreExtension::replaceFilter($str$from);
  74. }
  75. /**
  76.  * @internal
  77.  * @deprecated since Twig 3.9
  78.  */
  79. function twig_round($value$precision 0$method 'common')
  80. {
  81.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  82.     return CoreExtension::round($value$precision$method);
  83. }
  84. /**
  85.  * @internal
  86.  * @deprecated since Twig 3.9
  87.  */
  88. function twig_number_format_filter(Environment $env$number$decimal null$decimalPoint null$thousandSep null)
  89. {
  90.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  91.     return CoreExtension::numberFormatFilter($env$number$decimal$decimalPoint$thousandSep);
  92. }
  93. /**
  94.  * @internal
  95.  * @deprecated since Twig 3.9
  96.  */
  97. function twig_urlencode_filter($url)
  98. {
  99.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  100.     return CoreExtension::urlencodeFilter($url);
  101. }
  102. /**
  103.  * @internal
  104.  * @deprecated since Twig 3.9
  105.  */
  106. function twig_array_merge(...$arrays)
  107. {
  108.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  109.     return CoreExtension::arrayMerge(...$arrays);
  110. }
  111. /**
  112.  * @internal
  113.  * @deprecated since Twig 3.9
  114.  */
  115. function twig_slice(Environment $env$item$start$length null$preserveKeys false)
  116. {
  117.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  118.     return CoreExtension::slice($env$item$start$length$preserveKeys);
  119. }
  120. /**
  121.  * @internal
  122.  * @deprecated since Twig 3.9
  123.  */
  124. function twig_first(Environment $env$item)
  125. {
  126.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  127.     return CoreExtension::first($env$item);
  128. }
  129. /**
  130.  * @internal
  131.  * @deprecated since Twig 3.9
  132.  */
  133. function twig_last(Environment $env$item)
  134. {
  135.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  136.     return CoreExtension::last($env$item);
  137. }
  138. /**
  139.  * @internal
  140.  * @deprecated since Twig 3.9
  141.  */
  142. function twig_join_filter($value$glue ''$and null)
  143. {
  144.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  145.     return CoreExtension::joinFilter($value$glue$and);
  146. }
  147. /**
  148.  * @internal
  149.  * @deprecated since Twig 3.9
  150.  */
  151. function twig_split_filter(Environment $env$value$delimiter$limit null)
  152. {
  153.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  154.     return CoreExtension::splitFilter($env$value$delimiter$limit);
  155. }
  156. /**
  157.  * @internal
  158.  * @deprecated since Twig 3.9
  159.  */
  160. function twig_get_array_keys_filter($array)
  161. {
  162.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  163.     return CoreExtension::getArrayKeysFilter($array);
  164. }
  165. /**
  166.  * @internal
  167.  * @deprecated since Twig 3.9
  168.  */
  169. function twig_reverse_filter(Environment $env$item$preserveKeys false)
  170. {
  171.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  172.     return CoreExtension::reverseFilter($env$item$preserveKeys);
  173. }
  174. /**
  175.  * @internal
  176.  * @deprecated since Twig 3.9
  177.  */
  178. function twig_sort_filter(Environment $env$array$arrow null)
  179. {
  180.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  181.     return CoreExtension::sortFilter($env$array$arrow);
  182. }
  183. /**
  184.  * @internal
  185.  * @deprecated since Twig 3.9
  186.  */
  187. function twig_matches(string $regexp, ?string $str)
  188. {
  189.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  190.     return CoreExtension::matches($regexp$str);
  191. }
  192. /**
  193.  * @internal
  194.  * @deprecated since Twig 3.9
  195.  */
  196. function twig_trim_filter($string$characterMask null$side 'both')
  197. {
  198.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  199.     return CoreExtension::trimFilter($string$characterMask$side);
  200. }
  201. /**
  202.  * @internal
  203.  * @deprecated since Twig 3.9
  204.  */
  205. function twig_nl2br($string)
  206. {
  207.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  208.     return CoreExtension::nl2br($string);
  209. }
  210. /**
  211.  * @internal
  212.  * @deprecated since Twig 3.9
  213.  */
  214. function twig_spaceless($content)
  215. {
  216.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  217.     return CoreExtension::spaceless($content);
  218. }
  219. /**
  220.  * @internal
  221.  * @deprecated since Twig 3.9
  222.  */
  223. function twig_convert_encoding($string$to$from)
  224. {
  225.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  226.     return CoreExtension::convertEncoding($string$to$from);
  227. }
  228. /**
  229.  * @internal
  230.  * @deprecated since Twig 3.9
  231.  */
  232. function twig_length_filter(Environment $env$thing)
  233. {
  234.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  235.     return CoreExtension::lengthFilter($env$thing);
  236. }
  237. /**
  238.  * @internal
  239.  * @deprecated since Twig 3.9
  240.  */
  241. function twig_upper_filter(Environment $env$string)
  242. {
  243.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  244.     return CoreExtension::upperFilter($env$string);
  245. }
  246. /**
  247.  * @internal
  248.  * @deprecated since Twig 3.9
  249.  */
  250. function twig_lower_filter(Environment $env$string)
  251. {
  252.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  253.     return CoreExtension::lowerFilter($env$string);
  254. }
  255. /**
  256.  * @internal
  257.  * @deprecated since Twig 3.9
  258.  */
  259. function twig_striptags($string$allowable_tags null)
  260. {
  261.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  262.     return CoreExtension::striptags($string$allowable_tags);
  263. }
  264. /**
  265.  * @internal
  266.  * @deprecated since Twig 3.9
  267.  */
  268. function twig_title_string_filter(Environment $env$string)
  269. {
  270.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  271.     return CoreExtension::titleStringFilter($env$string);
  272. }
  273. /**
  274.  * @internal
  275.  * @deprecated since Twig 3.9
  276.  */
  277. function twig_capitalize_string_filter(Environment $env$string)
  278. {
  279.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  280.     return CoreExtension::capitalizeStringFilter($env$string);
  281. }
  282. /**
  283.  * @internal
  284.  * @deprecated since Twig 3.9
  285.  */
  286. function twig_test_empty($value)
  287. {
  288.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  289.     return CoreExtension::testEmpty($value);
  290. }
  291. /**
  292.  * @internal
  293.  * @deprecated since Twig 3.9
  294.  */
  295. function twig_test_iterable($value)
  296. {
  297.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  298.     return is_iterable($value);
  299. }
  300. /**
  301.  * @internal
  302.  * @deprecated since Twig 3.9
  303.  */
  304. function twig_include(Environment $env$context$template$variables = [], $withContext true$ignoreMissing false$sandboxed false)
  305. {
  306.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  307.     return CoreExtension::include($env$context$template$variables$withContext$ignoreMissing$sandboxed);
  308. }
  309. /**
  310.  * @internal
  311.  * @deprecated since Twig 3.9
  312.  */
  313. function twig_source(Environment $env$name$ignoreMissing false)
  314. {
  315.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  316.     return CoreExtension::source($env$name$ignoreMissing);
  317. }
  318. /**
  319.  * @internal
  320.  * @deprecated since Twig 3.9
  321.  */
  322. function twig_constant($constant$object null)
  323. {
  324.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  325.     return CoreExtension::constant($constant$object);
  326. }
  327. /**
  328.  * @internal
  329.  * @deprecated since Twig 3.9
  330.  */
  331. function twig_constant_is_defined($constant$object null)
  332. {
  333.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  334.     return CoreExtension::constantIsDefined($constant$object);
  335. }
  336. /**
  337.  * @internal
  338.  * @deprecated since Twig 3.9
  339.  */
  340. function twig_array_batch($items$size$fill null$preserveKeys true)
  341. {
  342.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  343.     return CoreExtension::arrayBatch($items$size$fill$preserveKeys);
  344. }
  345. /**
  346.  * @internal
  347.  * @deprecated since Twig 3.9
  348.  */
  349. function twig_array_column($array$name$index null): array
  350. {
  351.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  352.     return CoreExtension::arrayColumn($array$name$index);
  353. }
  354. /**
  355.  * @internal
  356.  * @deprecated since Twig 3.9
  357.  */
  358. function twig_array_filter(Environment $env$array$arrow)
  359. {
  360.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  361.     return CoreExtension::arrayFilter($env$array$arrow);
  362. }
  363. /**
  364.  * @internal
  365.  * @deprecated since Twig 3.9
  366.  */
  367. function twig_array_map(Environment $env$array$arrow)
  368. {
  369.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  370.     return CoreExtension::arrayMap($env$array$arrow);
  371. }
  372. /**
  373.  * @internal
  374.  * @deprecated since Twig 3.9
  375.  */
  376. function twig_array_reduce(Environment $env$array$arrow$initial null)
  377. {
  378.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  379.     return CoreExtension::arrayReduce($env$array$arrow$initial);
  380. }
  381. /**
  382.  * @internal
  383.  * @deprecated since Twig 3.9
  384.  */
  385. function twig_array_some(Environment $env$array$arrow)
  386. {
  387.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  388.     return CoreExtension::arraySome($env$array$arrow);
  389. }
  390. /**
  391.  * @internal
  392.  * @deprecated since Twig 3.9
  393.  */
  394. function twig_array_every(Environment $env$array$arrow)
  395. {
  396.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  397.     return CoreExtension::arrayEvery($env$array$arrow);
  398. }
  399. /**
  400.  * @internal
  401.  * @deprecated since Twig 3.9
  402.  */
  403. function twig_check_arrow_in_sandbox(Environment $env$arrow$thing$type)
  404. {
  405.     trigger_deprecation('twig/twig''3.9''Using the internal "%s" function is deprecated.'__FUNCTION__);
  406.     return CoreExtension::checkArrowInSandbox($env$arrow$thing$type);
  407. }