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