PHP Class Scalr\Service\Aws\DataType\ListDataType

Since: 23.09.2012
Author: Vitaliy Demidov ([email protected])
Inheritance: extends Scalr\Service\Aws\AbstractDataType, implements Iterato\Iterator, implements Countabl\Countable, implements ArrayAcces\ArrayAccess
Exibir arquivo Open project: scalr/scalr Class Usage Examples

Public Methods

Method Description
__construct ( string | array | object $aListData = null, string | array $propertyName = null, string $dataClassName = null ) Constructor
append ( mixed $item ) Appends item to the list
count ( )
current ( )
get ( integer $position = null ) : mixed Gets an original object at position N
getComputed ( ) : array Gets computed list
getDataClassName ( ) : string | null Gets data class name restriction
getExternalIdentifiers ( ) : array Gets an external identifier keys that are associated with this object.
getNextToken ( ) : string Gets nextToken.
getOriginal ( ) : array Gets original list.
getPropertyName ( ) : string | array | null Gets property name of object or a key of assocciative array
getQueryArray ( string $uriParameterName = null, boolean $member = true ) : string Gets query parameters array.
isValidObject ( mixed $object ) : boolean Checks if required object is valid.
key ( )
next ( )
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
rewind ( )
setNextToken ( string $nextToken ) Sets nextToken.
valid ( )

Protected Methods

Method Description
refresh ( ) Refreshes the list

Private Methods

Method Description
typeCastData ( mixed $v ) : mixed Type casts an list data object.

Method Details

__construct() public method

Constructor
public __construct ( string | array | object $aListData = null, string | array $propertyName = null, string $dataClassName = null )
$aListData string | array | object An array or single element of the list. It can be array of the objects of dataClassName class or a single object of the mentioned class.
$propertyName string | array optional A public property name of the object that is used as out for query string.
$dataClassName string optional A data class name of the objects which form a list.

append() public method

Appends item to the list
public append ( mixed $item )
$item mixed

count() public method

See also: Countable::count()
public count ( )

current() public method

See also: Iterator::current()
public current ( )

get() public method

Gets an original object at position N
public get ( integer $position = null ) : mixed
$position integer optional A position at the list. If null it will use current position.
return mixed Returns an original object at position N in the list.

getComputed() public method

Gets computed list
public getComputed ( ) : array
return array Returns computed array of values that represent list.

getDataClassName() public method

Gets data class name restriction
public getDataClassName ( ) : string | null
return string | null Returns data class name

getExternalIdentifiers() public method

Gets an external identifier keys that are associated with this object.
public getExternalIdentifiers ( ) : array
return array Returns the list of the external identifiers.

getNextToken() public method

Gets nextToken.
public getNextToken ( ) : string
return string Returns nextToken.

getOriginal() public method

Gets original data array that has been passed as argument in constructor.
public getOriginal ( ) : array
return array Returns original data array that has been passed as first argument in constructor.

getPropertyName() public method

Gets property name of object or a key of assocciative array
public getPropertyName ( ) : string | array | null
return string | array | null Returns property name of object or a key of assocciative array

getQueryArray() public method

This method overrides parent method.
public getQueryArray ( string $uriParameterName = null, boolean $member = true ) : string
$uriParameterName string optional Parameter name. If null it will use class property name that is provided in constructor.
$member boolean optional Should it add member prefix
return string Returns query parameters array looks like array ( 'parameterName.member.n[.propName[.member.m]]' => value ) Values are not url encoded.

isValidObject() public method

Checks if required object is valid.
public isValidObject ( mixed $object ) : boolean
$object mixed
return boolean Returns TRUE if object is an instancse of correct data class

key() public method

See also: Iterator::key()
public key ( )

next() public method

See also: Iterator::next()
public next ( )

offsetExists() public method

See also: ArrayAccess::offsetExists()
public offsetExists ( $offset )

offsetGet() public method

See also: ArrayAccess::offsetGet()
public offsetGet ( $offset )

offsetSet() public method

See also: ArrayAccess::offsetSet()
public offsetSet ( $offset, $value )

offsetUnset() public method

See also: ArrayAccess::offsetUnset()
public offsetUnset ( $offset )

refresh() protected method

Refreshes the list
protected refresh ( )

rewind() public method

See also: Iterator::rewind()
public rewind ( )

setNextToken() public method

Sets nextToken.
public setNextToken ( string $nextToken )
$nextToken string Next Token

valid() public method

See also: Iterator::valid()
public valid ( )