TYPO3 CMS  TYPO3_8-7
ConditionMatcherUserFuncs.php
Go to the documentation of this file.
1 <?php
2 /*
3  * This file is part of the TYPO3 CMS project.
4  *
5  * It is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License, either version 2
7  * of the License, or any later version.
8  *
9  * For the full copyright and license information, please read the
10  * LICENSE.txt file that was distributed with this source code.
11  *
12  * The TYPO3 project - inspiring people to share!
13  */
14 
15 namespace {
17  {
18  return count(func_get_args()) === 0;
19  }
20 
22  {
23  return func_num_args() === 1;
24  }
25 
27  {
28  return func_num_args() === 3;
29  }
30 
32  {
33  $result = true;
34  foreach ($arguments as $argument) {
35  $result &= (trim($argument) == $argument);
36  }
37  return $result;
38  }
39 
40  function user_testFunctionWithSpaces($value)
41  {
42  return $value === ' 3, 4, 5, 6 ';
43  }
44 
45  function user_testFunction()
46  {
47  return true;
48  }
49 
51  {
52  return false;
53  }
54 
56  {
57  return $value === 'value "';
58  }
59 
60  function user_testQuotes($value)
61  {
62  return $value === '1 " 2';
63  }
64 
66  {
71  public static function isTrue($value)
72  {
73  return (bool)$value;
74  }
75  }
76 }
user_testFunctionWithNoArgument()
user_testFunctionWithSpaces($value)
user_testQuotes($value)
user_testFunctionWithThreeArguments()
user_testFunctionWithQuoteMissing($value)
user_testFunctionWithSingleArgument()
user_testFunctionWithThreeArgumentsSpaces(... $arguments)
user_testFunctionFalse()