PHP Класс DataSift\Storyplayer\PlayerLib\Story_Checkpoint

Автор: Stuart Herbert ([email protected])
Наследование: implements IteratorAggregat\IteratorAggregate
Показать файл Открыть проект

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

Метод Описание
__construct ( StoryTeller $st ) our constructor
__get ( string $key ) : mixed magic method to retrieve data from the checkpoint
__isset ( string $key ) : boolean magic method to tell if the data is stored in the checkpoint or not
__set ( string $key, mixed $value ) : void magic method to store data in the checkpoint
getData ( ) : stdClass get all the data held inside the checkpoint
getIterator ( ) : Traversable support foreach() loops over our data
getList ( string $propName ) : array retrieve the named property as an associative array, even if it is actually an object
getProperties_asList ( $prefix = null ) : array convert our public properties to an array
getReadOnly ( ) : boolean is the checkpoint currently readonly?
getString ( string $propName, string $default = '' ) : string return the named property as a string, or return the default if the property isn't a string
has ( string $propName ) : boolean Do we have a named property set to non-null?
hasList ( string $propName ) : boolean Do we have a named property, and is it a non-empty array?
is ( string $propName ) : boolean Is the named property set to true?
isNot ( string $propName ) : boolean is the named property set to false?
setReadOnly ( ) put the checkpoint into readonly mode
setReadWrite ( ) put the checkpoint into read-write mode

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

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

our constructor
public __construct ( StoryTeller $st )
$st StoryTeller The StoryTeller object (which we will cache)

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

throws the E5xx_NoSuchDataInCheckpoint exception if you attempt to get data that does not exist
public __get ( string $key ) : mixed
$key string the name of the data to store
Результат mixed the data stored in the checkpoint

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

magic method to tell if the data is stored in the checkpoint or not
public __isset ( string $key ) : boolean
$key string the name of the data to test for
Результат boolean TRUE if the data exists in the checkpoint FALSE if the data does not exist in the checkpoint

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

throws the E5xx_CheckpointIsReadOnly exception if you attempt to store data when the checkpoint is in readonly mode
public __set ( string $key, mixed $value ) : void
$key string the name of the data to store
$value mixed the value to store in the checkpoint
Результат void

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

get all the data held inside the checkpoint
public getData ( ) : stdClass
Результат stdClass

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

support foreach() loops over our data
public getIterator ( ) : Traversable
Результат Traversable

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

retrieve the named property as an associative array, even if it is actually an object
public getList ( string $propName ) : array
$propName string
Результат array

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

convert our public properties to an array
public getProperties_asList ( $prefix = null ) : array
Результат array

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

is the checkpoint currently readonly?
public getReadOnly ( ) : boolean
Результат boolean TRUE if the checkpoint is currently readonly FALSE if you can change the data in the checkpoint

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

return the named property as a string, or return the default if the property isn't a string
public getString ( string $propName, string $default = '' ) : string
$propName string name of property to retrieve
$default string default value to return if property not set
Результат string

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

Do we have a named property set to non-null?
public has ( string $propName ) : boolean
$propName string
Результат boolean

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

Do we have a named property, and is it a non-empty array?
public hasList ( string $propName ) : boolean
$propName string
Результат boolean

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

Is the named property set to true?
public is ( string $propName ) : boolean
$propName string
Результат boolean

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

is the named property set to false?
public isNot ( string $propName ) : boolean
$propName string
Результат boolean

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

put the checkpoint into readonly mode
public setReadOnly ( )

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

put the checkpoint into read-write mode
public setReadWrite ( )