Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

class.php
Go to the documentation of this file.
1 <?php
16 class ezpContentClassCriteria implements ezpContentCriteriaInterface
17 {
25 public function is( $contentClassName )
26 {
27 $this->classes[] = $contentClassName;
28 return $this;
29 }
30
31 public function translate()
32 {
33 return array(
34 'type' => 'param',
35 'name' => array( 'ClassFilterType', 'ClassFilterArray' ),
36 'value' => array( 'include', $this->classes ),
37 );
38 }
39
40 public function __toString()
41 {
42 if ( count( $this->classes ) == 0 )
43 return 'N/A';
44 elseif ( count( $this->classes ) == 1 )
45 return "Content class is {$this->classes[0]}";
46 else
47 return "Content class is one of " .
48 join( ', ', array_slice( $this->classes, 0, -1 ) ) .
49 " or " . join( '', array_slice( $this->classes, 0, -1 ) );
50 }
51
52 public $classes = array();
53 }
54 ?>
ezpContentClassCriteria
Definition: class.php:17
ezpContentClassCriteria\translate
translate()
Definition: class.php:31
ezpContentClassCriteria\__toString
__toString()
Definition: class.php:40
ezpContentClassCriteria\is
is( $contentClassName)
Definition: class.php:25
ezpContentClassCriteria\$classes
$classes
Definition: class.php:52
ezpContentCriteriaInterface
Definition: content_criteria.php:17
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.