PHP Класс ListObject

Наследование: extends Object
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$m_cacheKey
$m_columns integer The number of columns (for generating tables)
$m_constraints array The constraints array
$m_defaultIterator object The default iterator for the current object.
$m_defaultTTL
$m_limit integer The maximum number of objects in the list, 0 for no limit
$m_objects array The list of objects.
$m_order array The order constraints array
$m_parameters
$m_start integer The start element number from which to generate the list.
$m_totalCount integer The total number of elements in the list without the limits.

Открытые методы

Метод Описание
ParseConstraintsString ( string $p_constraintsString ) : array Parses the constraints string and returns an array of words
__construct ( integer $p_start, string $p_parameters = [] ) constructor For blank lists the start element index ($p_start) is smaller than 0.
__get ( $p_property ) : mix Overloaded method call to give access to the list properties.
defaultIterator ( ) : object Returns the default iterator of this list.
defaultName ( ) : string Generates a unique name for this list object.
getColumn ( integer $p_iterator = null ) Returns the column number for the given iterator
getColumns ( ) : integer Returns the number of columns.
getConstraintsString ( ) : string Returns the constraints string.
getCurrent ( ) : object Returns the current element of the default iterator.
getEnd ( ) : integer Returns the index of the last element of this list in the original list from which this was truncated.
getIndex ( ) : integer Returns the index of the current element of the default iterator.
getIterator ( ) : object Returns an iterator for this list.
getLength ( ) : integer Returns the length of the list.
getLimit ( ) : integer Returns the maximum number of elements, 0 for limitless.
getName ( ) : string Returns the list name.
getOrderString ( ) : string Returns the order string.
getRow ( integer $p_iterator = null ) Returns the row number for the given iterator
getStart ( ) : integer Returns the index of the start element of this list in the original list from which this was truncated.
getTotalCount ( ) : unknown Returns the total number of elements in the list without the limits.
hasNextElements ( ) : boolean Returns true if this list is limited and elements still exist in the original list (from which this was truncated) after the last element of this list.
hasPreviousElements ( ) : boolean Returns true if the index of the start element in the original list - from which this was truncated - is greater than 0.
isBlank ( ) : boolean Return true if the list is blank (see the constructor documentation).
isEmpty ( ) : boolean Return true if the list is empty.
isLimited ( ) : boolean Returns true if the list is limited to a certain number of elements.
setId ( string $p_id ) Sets the list identifier

Защищенные методы

Метод Описание
CreateList ( integer $p_start, integer $p_limit, array $p_parameters, integer &$p_count ) : array Creates the list of objects. Sets the parameter $p_hasNextElements to true if this list is limited and elements still exist in the original list (from which this was truncated) after the last element of this list.
ProcessConstraints ( array $p_constraints ) : array Processes list constraints passed in an array.
ProcessOrder ( array $p_order ) : array Processes order constraints passed in an array.
ProcessParameters ( array $p_parameters ) : array Processes the input parameters passed in an array; drops the invalid parameters and parameters with invalid values. Returns an array of valid parameters.
getCacheKey ( )

Приватные методы

Метод Описание
duplicateObject ( object $p_source ) : object Copies the given object
getNextStart ( ) : integer Returns the start element index of the next group of items from the list. Returns null if the list had no limit.
getPrevStart ( ) : integer Returns the start element index of the previous group of items from the list. Returns null if the list had no limit.

Описание методов

CreateList() абстрактный защищенный Метод

Creates the list of objects. Sets the parameter $p_hasNextElements to true if this list is limited and elements still exist in the original list (from which this was truncated) after the last element of this list.
abstract protected CreateList ( integer $p_start, integer $p_limit, array $p_parameters, integer &$p_count ) : array
$p_start integer
$p_limit integer
$p_parameters array
$p_count integer
Результат array

ParseConstraintsString() публичный статический Метод

Parses the constraints string and returns an array of words
public static ParseConstraintsString ( string $p_constraintsString ) : array
$p_constraintsString string
Результат array

ProcessConstraints() абстрактный защищенный Метод

Processes list constraints passed in an array.
abstract protected ProcessConstraints ( array $p_constraints ) : array
$p_constraints array
Результат array

ProcessOrder() абстрактный защищенный Метод

Processes order constraints passed in an array.
abstract protected ProcessOrder ( array $p_order ) : array
$p_order array
Результат array

ProcessParameters() абстрактный защищенный Метод

Processes the input parameters passed in an array; drops the invalid parameters and parameters with invalid values. Returns an array of valid parameters.
abstract protected ProcessParameters ( array $p_parameters ) : array
$p_parameters array
Результат array

__construct() публичный Метод

constructor For blank lists the start element index ($p_start) is smaller than 0.
public __construct ( integer $p_start, string $p_parameters = [] )
$p_start integer
$p_parameters string

__get() публичный Метод

Overloaded method call to give access to the list properties.
public __get ( $p_property ) : mix
Результат mix - the property value

defaultIterator() публичный Метод

Returns the default iterator of this list.
public defaultIterator ( ) : object
Результат object of type ArrayIterator

defaultName() публичный Метод

Generates a unique name for this list object.
public defaultName ( ) : string
Результат string

getCacheKey() защищенный Метод

protected getCacheKey ( )

getColumn() публичный Метод

Returns the column number for the given iterator
public getColumn ( integer $p_iterator = null )
$p_iterator integer

getColumns() публичный Метод

Returns the number of columns.
public getColumns ( ) : integer
Результат integer

getConstraintsString() публичный Метод

Returns the constraints string.
public getConstraintsString ( ) : string
Результат string

getCurrent() публичный Метод

Returns the current element of the default iterator.
public getCurrent ( ) : object
Результат object

getEnd() публичный Метод

Returns the index of the last element of this list in the original list from which this was truncated.
public getEnd ( ) : integer
Результат integer

getIndex() публичный Метод

Returns the index of the current element of the default iterator.
public getIndex ( ) : integer
Результат integer

getIterator() публичный Метод

Returns an iterator for this list.
public getIterator ( ) : object
Результат object of type ArrayIterator

getLength() публичный Метод

Returns the length of the list.
public getLength ( ) : integer
Результат integer

getLimit() публичный Метод

Returns the maximum number of elements, 0 for limitless.
public getLimit ( ) : integer
Результат integer

getName() публичный Метод

Returns the list name.
public getName ( ) : string
Результат string

getOrderString() публичный Метод

Returns the order string.
public getOrderString ( ) : string
Результат string

getRow() публичный Метод

Returns the row number for the given iterator
public getRow ( integer $p_iterator = null )
$p_iterator integer

getStart() публичный Метод

Returns the index of the start element of this list in the original list from which this was truncated.
public getStart ( ) : integer
Результат integer

getTotalCount() публичный Метод

Returns the total number of elements in the list without the limits.
public getTotalCount ( ) : unknown
Результат unknown

hasNextElements() публичный Метод

Returns true if this list is limited and elements still exist in the original list (from which this was truncated) after the last element of this list.
public hasNextElements ( ) : boolean
Результат boolean

hasPreviousElements() публичный Метод

Returns true if the index of the start element in the original list - from which this was truncated - is greater than 0.
public hasPreviousElements ( ) : boolean
Результат boolean

isBlank() публичный Метод

Return true if the list is blank (see the constructor documentation).
public isBlank ( ) : boolean
Результат boolean

isEmpty() публичный Метод

Return true if the list is empty.
public isEmpty ( ) : boolean
Результат boolean

isLimited() публичный Метод

Returns true if the list is limited to a certain number of elements.
public isLimited ( ) : boolean
Результат boolean

setId() публичный Метод

Sets the list identifier
public setId ( string $p_id )
$p_id string

Описание свойств

$m_cacheKey защищенное свойство

protected $m_cacheKey

$m_columns защищенное свойство

The number of columns (for generating tables)
protected int $m_columns
Результат integer

$m_constraints защищенное свойство

The constraints array
protected array $m_constraints
Результат array

$m_defaultIterator защищенное свойство

The default iterator for the current object.
protected object $m_defaultIterator
Результат object

$m_defaultTTL защищенное свойство

protected $m_defaultTTL

$m_limit защищенное свойство

The maximum number of objects in the list, 0 for no limit
protected int $m_limit
Результат integer

$m_objects защищенное свойство

The list of objects.
protected array $m_objects
Результат array

$m_order защищенное свойство

The order constraints array
protected array $m_order
Результат array

$m_parameters защищенное свойство

protected $m_parameters

$m_start защищенное свойство

The start element number from which to generate the list.
protected int $m_start
Результат integer

$m_totalCount защищенное свойство

The total number of elements in the list without the limits.
protected int $m_totalCount
Результат integer