PHP 클래스 DataSift\Storyplayer\PlayerLib\Story_Checkpoint

저자: Stuart Herbert ([email protected])
상속: implements IteratorAggregat\IteratorAggregate
파일 보기 프로젝트 열기: datasift/storyplayer

공개 메소드들

메소드 설명
__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 ( )