Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

criteria.php
Go to the documentation of this file.
1 <?php
28 class ezpContentCriteria
29 {
30 public function __construct()
31 {
32 $this->accept = new ezpContentCriteriaSet();
33 $this->deny = new ezpContentCriteriaSet();
34 }
35
40 public static function location()
41 {
42 return new ezpContentLocationCriteria();
43 }
44
50 public static function field( $fieldIdentifier )
51 {
52 return new ezpContentFieldCriteria( $fieldIdentifier );
53 }
54
59 public static function contentClass()
60 {
61 return new ezpContentClassCriteria();
62 }
63
68 public static function limit()
69 {
70 return new ezpContentLimitCriteria();
71 }
72
78 public static function sorting( $sortKey, $sortOrder )
79 {
80 return new ezpContentSortingCriteria( $sortKey, $sortOrder );
81 }
82
87 public static function depth( $depth = 1 )
88 {
89 return new ezpContentDepthCriteria( $depth );
90 }
91
99 public static function __callStatic( $method, $arguments )
100 {
101 }
102
111 public static function custom( $method, $arguments )
112 {
113 }
114
118 public function __toString()
119 {
120 $acceptCriteriaCount = count( $this->accept );
121 $denyCriteriaCount = count( $this->deny );
122
123 $string = "Criteria\n";
124 $string .= "- $acceptCriteriaCount accept criteria";
125 if ( $acceptCriteriaCount > 0 )
126 {
127 $string .= ":\n";
128 foreach( $this->accept as $acceptCriteria )
129 $string .= " - {$acceptCriteria}\n";
130 }
131 else
132 $string .= "\n";
133
134 $string .= "- $denyCriteriaCount deny criteria";
135 if ( $denyCriteriaCount > 0 )
136 {
137 $string .= ":\n";
138 foreach( $this->deny as $denyCriteria )
139 $string .= " - {$denyCriteria}\n";
140 }
141 else
142 $string .= "\n";
143
144 return $string;
145 }
146
151 public $accept;
152
157 public $deny;
158 }
159 ?>
ezpContentClassCriteria
Definition: class.php:17
ezpContentCriteriaSet
Definition: criteria_set.php:17
ezpContentCriteria
Definition: criteria.php:29
ezpContentCriteria\$deny
$deny
Definition: criteria.php:157
ezpContentCriteria\field
static field( $fieldIdentifier)
Definition: criteria.php:50
ezpContentCriteria\location
static location()
Definition: criteria.php:40
ezpContentCriteria\custom
static custom( $method, $arguments)
Definition: criteria.php:111
ezpContentCriteria\limit
static limit()
Definition: criteria.php:68
ezpContentCriteria\contentClass
static contentClass()
Definition: criteria.php:59
ezpContentCriteria\__toString
__toString()
Definition: criteria.php:118
ezpContentCriteria\__construct
__construct()
Definition: criteria.php:30
ezpContentCriteria\$accept
$accept
Definition: criteria.php:151
ezpContentCriteria\__callStatic
static __callStatic( $method, $arguments)
Definition: criteria.php:99
ezpContentCriteria\depth
static depth( $depth=1)
Definition: criteria.php:87
ezpContentCriteria\sorting
static sorting( $sortKey, $sortOrder)
Definition: criteria.php:78
ezpContentDepthCriteria
Definition: depth.php:17
ezpContentFieldCriteria
Definition: criteria/field.php:18
ezpContentLimitCriteria
Definition: limit.php:17
ezpContentLocationCriteria
Definition: content/criteria/location.php:17
ezpContentSortingCriteria
Definition: sorting.php:17
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.