PHP Class Mlp_Plugin_Properties

Author: Inpsyde GmbH, toscho
Inheritance: implements Inpsyde_Property_List_Interface
显示文件 Open project: inpsyde/multilingual-press Class Usage Examples

Public Methods

Method Description
__get ( string $name ) : mixed Wrapper for get()
__isset ( string $name ) : boolean Wrapper for has().
__set ( string $name, mixed $value ) : void | Mlp_Plugin_Properties Wrapper for set().
delete ( string $name ) : void | Inpsyde_Property_List_Interface Delete a key and set its name to the $deleted list.
freeze ( ) : Inpsyde_Property_List_Interface Lock write access to this object's instance. Forever.
get ( string $name ) : mixed Get a value.
has ( string $name ) : boolean Check if property exists.
has_parent ( ) : boolean Test if the current instance has a parent.
is_frozen ( ) : boolean Test from outside if an object has been frozen.
set ( string $name, mixed $value ) : void | Mlp_Plugin_Properties Set new value.
set_parent ( Inpsyde_Property_List_Interface $object ) : Inpsyde_Property_List_Interface Set parent object. Properties of this object will be inherited.

Private Methods

Method Description
stop ( string $msg, string $code = '' ) : void | WP_Error Used for attempts to write to a frozen instance.

Method Details

__get() public method

Wrapper for get()
See also: get()
public __get ( string $name ) : mixed
$name string
return mixed

__isset() public method

Wrapper for has().
See also: has()
public __isset ( string $name ) : boolean
$name string
return boolean

__set() public method

Wrapper for set().
See also: set()
public __set ( string $name, mixed $value ) : void | Mlp_Plugin_Properties
$name string
$value mixed
return void | Mlp_Plugin_Properties

delete() public method

Further calls to has() and get() will not take this property into account.
public delete ( string $name ) : void | Inpsyde_Property_List_Interface
$name string
return void | Inpsyde_Property_List_Interface

freeze() public method

Lock write access to this object's instance. Forever.
public freeze ( ) : Inpsyde_Property_List_Interface
return Inpsyde_Property_List_Interface $this

get() public method

Might be taken from parent object.
public get ( string $name ) : mixed
$name string
return mixed

has() public method

Due to syntax restrictions in PHP we cannot name this "isset()".
public has ( string $name ) : boolean
$name string
return boolean

has_parent() public method

Test if the current instance has a parent.
public has_parent ( ) : boolean
return boolean

is_frozen() public method

Test from outside if an object has been frozen.
public is_frozen ( ) : boolean
return boolean

set() public method

Set new value.
public set ( string $name, mixed $value ) : void | Mlp_Plugin_Properties
$name string
$value mixed
return void | Mlp_Plugin_Properties

set_parent() public method

Set parent object. Properties of this object will be inherited.
public set_parent ( Inpsyde_Property_List_Interface $object ) : Inpsyde_Property_List_Interface
$object Inpsyde_Property_List_Interface
return Inpsyde_Property_List_Interface