PHP 클래스 Newscoop\TemplateList\BaseList

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

보호된 프로퍼티들

프로퍼티 타입 설명
$cacheKey mixed List cache key
$columns integer The number of columns (for generating tables)
$constraints array The constraints array.
$critera Newscoop\Criteria The Criteria object
$defaultIterator object The default iterator for the current object.
$defaultTTL integer Default cache time
$firstResult integer The start page number from which to generate the list.
$hasNextResults boolean True if the generated list has more elements than $this->m_limit
$id string The identifier of the list
$maxResults integer The maximum number of objects in the list, null or 0 for no limit
$name string The name of the list
$objectsList Newscoop\ListResult The list of objects.
$operatorsMap
$parameters array The clean array of parameters
$totalCount integer The total number of elements in the list without the limits.

공개 메소드들

메소드 설명
__construct ( $criteria )
__get ( string $property ) : mixed Overloaded method call to give access to the list properties.
defaultIterator ( ) : object Returns the default iterator of this list.
getColumn ( integer $iterator = null ) Returns the column number for the given iterator
getColumns ( ) : integer Returns the number of columns.
getConstraints ( ) : array Returns the constraints.
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.
getList ( $firstResult, $parameters )
getName ( ) : string Returns the list name.
getRow ( $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 $id ) Sets the list identifier
setTotalCount ( $totalCount ) : unknown Set list total count.

보호된 메소드들

메소드 설명
convertConstraints ( ) Convert constraints array to Criteria
convertParameters ( integer $firstResult, array $parameters ) : Criteria Convert parameters array to Criteria
getCacheKey ( )
parseConstraintsString ( string $constraintsString ) : array Parses the constraints string and returns an array of words
prepareList ( Criteria $criteria, array $parameters ) : ListResult Get ListResult object with list elements
setCriteria ( Criteria $criteria ) Set Criteria object

비공개 메소드들

메소드 설명
defaultName ( ) : string Generates a unique name for this list object.
duplicateObject ( object $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.

메소드 상세

__construct() 공개 메소드

public __construct ( $criteria )

__get() 공개 메소드

Overloaded method call to give access to the list properties.
public __get ( string $property ) : mixed
$property string - the property name
리턴 mixed the property value

convertConstraints() 보호된 메소드

Convert constraints array to Criteria
protected convertConstraints ( )

convertParameters() 보호된 메소드

Convert parameters array to Criteria
protected convertParameters ( integer $firstResult, array $parameters ) : Criteria
$firstResult integer
$parameters array
리턴 Newscoop\Criteria

defaultIterator() 공개 메소드

Returns the default iterator of this list.
public defaultIterator ( ) : object
리턴 object of type ArrayIterator

getCacheKey() 보호된 메소드

protected getCacheKey ( )

getColumn() 공개 메소드

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

getColumns() 공개 메소드

Returns the number of columns.
public getColumns ( ) : integer
리턴 integer

getConstraints() 공개 메소드

Returns the constraints.
public getConstraints ( ) : array
리턴 array

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

getList() 공개 메소드

public getList ( $firstResult, $parameters )

getName() 공개 메소드

Returns the list name.
public getName ( ) : string
리턴 string

getRow() 공개 메소드

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

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

parseConstraintsString() 보호된 메소드

Parses the constraints string and returns an array of words
protected parseConstraintsString ( string $constraintsString ) : array
$constraintsString string
리턴 array

prepareList() 추상적인 보호된 메소드

Get ListResult object with list elements
abstract protected prepareList ( Criteria $criteria, array $parameters ) : ListResult
$criteria Newscoop\Criteria
$parameters array
리턴 Newscoop\ListResult

setCriteria() 보호된 메소드

Set Criteria object
protected setCriteria ( Criteria $criteria )
$criteria Newscoop\Criteria

setId() 공개 메소드

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

setTotalCount() 공개 메소드

Set list total count.
public setTotalCount ( $totalCount ) : unknown
리턴 unknown

프로퍼티 상세

$cacheKey 보호되어 있는 프로퍼티

List cache key
protected mixed $cacheKey
리턴 mixed

$columns 보호되어 있는 프로퍼티

The number of columns (for generating tables)
protected int $columns
리턴 integer

$constraints 보호되어 있는 프로퍼티

The constraints array.
protected array $constraints
리턴 array

$critera 보호되어 있는 프로퍼티

The Criteria object
protected Criteria,Newscoop $critera
리턴 Newscoop\Criteria

$defaultIterator 보호되어 있는 프로퍼티

The default iterator for the current object.
protected object $defaultIterator
리턴 object

$defaultTTL 보호되어 있는 프로퍼티

Default cache time
protected int $defaultTTL
리턴 integer

$firstResult 보호되어 있는 프로퍼티

The start page number from which to generate the list.
protected int $firstResult
리턴 integer

$hasNextResults 보호되어 있는 프로퍼티

True if the generated list has more elements than $this->m_limit
protected bool $hasNextResults
리턴 boolean

$id 보호되어 있는 프로퍼티

The identifier of the list
protected string $id
리턴 string

$maxResults 보호되어 있는 프로퍼티

The maximum number of objects in the list, null or 0 for no limit
protected int $maxResults
리턴 integer

$name 보호되어 있는 프로퍼티

The name of the list
protected string $name
리턴 string

$objectsList 보호되어 있는 프로퍼티

The list of objects.
protected ListResult,Newscoop $objectsList
리턴 Newscoop\ListResult

$operatorsMap 보호되어 있는 프로퍼티

protected $operatorsMap

$parameters 보호되어 있는 프로퍼티

The clean array of parameters
protected array $parameters
리턴 array

$totalCount 보호되어 있는 프로퍼티

The total number of elements in the list without the limits.
protected int $totalCount
리턴 integer