Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

limit.php
Go to the documentation of this file.
1 <?php
16 class ezpContentLimitCriteria implements ezpContentCriteriaInterface
17 {
22 private $offset;
23
28 private $limit;
29
30 public function __construct()
31 {
32 $this->offset = 0;
33 }
34
40 public function offset( $offset )
41 {
42 $offset = (int)$offset;
43 if( $offset >= 0 )
44 $this->offset = $offset;
45
46 return $this;
47 }
48
54 public function limit( $limit )
55 {
56 $limit = (int)$limit;
57 if( $limit > 0 )
58 $this->limit = $limit;
59
60 return $this;
61 }
62
63 public function translate()
64 {
65 $aTranslation = array(
66 'type' => 'param',
67 'name' => array( 'Offset', 'Limit' ),
68 'value' => array( $this->offset, $this->limit )
69 );
70
71 return $aTranslation;
72 }
73
74 public function __toString()
75 {
76 return 'With offset : '.$this->offset.' / limit : '.$this->limit;
77 }
78 }
79 ?>
ezpContentLimitCriteria
Definition: limit.php:17
ezpContentLimitCriteria\translate
translate()
Definition: limit.php:63
ezpContentLimitCriteria\$limit
$limit
Definition: limit.php:28
ezpContentLimitCriteria\limit
limit( $limit)
Definition: limit.php:54
ezpContentLimitCriteria\$offset
$offset
Definition: limit.php:22
ezpContentLimitCriteria\offset
offset( $offset)
Definition: limit.php:40
ezpContentLimitCriteria\__toString
__toString()
Definition: limit.php:74
ezpContentLimitCriteria\__construct
__construct()
Definition: limit.php:30
ezpContentCriteriaInterface
Definition: content_criteria.php:17
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.