PHP 클래스 ListObject

상속: extends Object
파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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