‪TYPO3CMS  9.5
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 
41  {
42  return $value === ' 3, 4, 5, 6 ';
43  }
44 
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_testFunctionWithSpaces
‪user_testFunctionWithSpaces($value)
Definition: ConditionMatcherUserFuncs.php:40
‪user_testFunctionWithNoArgument
‪user_testFunctionWithNoArgument()
Definition: ConditionMatcherUserFuncs.php:16
‪user_testQuotes
‪user_testQuotes($value)
Definition: ConditionMatcherUserFuncs.php:60
‪user_testFunctionWithThreeArguments
‪user_testFunctionWithThreeArguments()
Definition: ConditionMatcherUserFuncs.php:26
‪user_testFunction
‪user_testFunction()
Definition: ConditionMatcherUserFuncs.php:45
‪ConditionMatcherUserFunctions
Definition: ConditionMatcherUserFuncs.php:66
‪ConditionMatcherUserFunctions\isTrue
‪static bool isTrue($value)
Definition: ConditionMatcherUserFuncs.php:71
‪user_testFunctionWithSingleArgument
‪user_testFunctionWithSingleArgument()
Definition: ConditionMatcherUserFuncs.php:21
‪user_testFunctionWithQuoteMissing
‪user_testFunctionWithQuoteMissing($value)
Definition: ConditionMatcherUserFuncs.php:55
‪user_testFunctionWithThreeArgumentsSpaces
‪user_testFunctionWithThreeArgumentsSpaces(... $arguments)
Definition: ConditionMatcherUserFuncs.php:31
‪user_testFunctionFalse
‪user_testFunctionFalse()
Definition: ConditionMatcherUserFuncs.php:50