PHP Class DataSift\Storyplayer\PlayerLib\Story_Checkpoint

Inheritance: implements IteratorAggregat\IteratorAggregate
Mostrar archivo Open project: datasift/storyplayer

Public Methods

Method Description
__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

Method Details

__construct() public method

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

__get() public method

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
return mixed the data stored in the checkpoint

__isset() public method

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
return boolean TRUE if the data exists in the checkpoint FALSE if the data does not exist in the checkpoint

__set() public method

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
return void

getData() public method

get all the data held inside the checkpoint
public getData ( ) : stdClass
return stdClass

getIterator() public method

support foreach() loops over our data
public getIterator ( ) : Traversable
return Traversable

getList() public method

retrieve the named property as an associative array, even if it is actually an object
public getList ( string $propName ) : array
$propName string
return array

getProperties_asList() public method

convert our public properties to an array
public getProperties_asList ( $prefix = null ) : array
return array

getReadOnly() public method

is the checkpoint currently readonly?
public getReadOnly ( ) : boolean
return boolean TRUE if the checkpoint is currently readonly FALSE if you can change the data in the checkpoint

getString() public method

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
return string

has() public method

Do we have a named property set to non-null?
public has ( string $propName ) : boolean
$propName string
return boolean

hasList() public method

Do we have a named property, and is it a non-empty array?
public hasList ( string $propName ) : boolean
$propName string
return boolean

is() public method

Is the named property set to true?
public is ( string $propName ) : boolean
$propName string
return boolean

isNot() public method

is the named property set to false?
public isNot ( string $propName ) : boolean
$propName string
return boolean

setReadOnly() public method

put the checkpoint into readonly mode
public setReadOnly ( )

setReadWrite() public method

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