Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

sorting.php
Go to the documentation of this file.
1 <?php
16 class ezpContentSortingCriteria implements ezpContentCriteriaInterface
17 {
23 private $sortKey;
24
29 private $sortOrder;
30
31 public function __construct( $sortKey, $sortOrder )
32 {
33 $this->sortKey = $sortKey;
34 $this->sortOrder = ( $sortOrder == 'asc' ) ? true : false;
35 }
36
37 public function translate()
38 {
39 return array(
40 'type' => 'param',
41 'name' => array( 'SortBy' ),
42 'value' => array( array( $this->sortKey, $this->sortOrder ) )
43 );
44 }
45
46 public function __toString()
47 {
48 $sortOrderString = $this->sortOrder ? 'asc' : 'desc';
49 return 'With sortKey '.$this->sortKey.' and '.$sortOrderString.' sortOrder';
50 }
51 }
52 ?>
ezpContentSortingCriteria
Definition: sorting.php:17
ezpContentSortingCriteria\translate
translate()
Definition: sorting.php:37
ezpContentSortingCriteria\$sortOrder
$sortOrder
Definition: sorting.php:29
ezpContentSortingCriteria\__construct
__construct( $sortKey, $sortOrder)
Definition: sorting.php:31
ezpContentSortingCriteria\__toString
__toString()
Definition: sorting.php:46
ezpContentSortingCriteria\$sortKey
$sortKey
Definition: sorting.php:23
ezpContentCriteriaInterface
Definition: content_criteria.php:17
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.