PHP Class IMP_Flag_Base, horde

Author: Michael Slusarz ([email protected])
Inheritance: implements Serializable
ファイルを表示 Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_bgcolor string The background color.
$_canset boolean Is this flag settable by the user?
$_css string The CSS class.
$_cssIcon string The CSS class for the icon.
$_id string Unique ID.

Public Methods

Method Description
__get ( $name )
__set ( string $name, string $value ) Set properties.
__toString ( ) : string String representation of the object.
changed ( array $obs, boolean $add ) : mixed Given a list of flag objects, determines if this flag's status has changed.
getLabel ( boolean $set = true ) : string Return the flag label.
serialize ( )
unserialize ( $data )

Protected Methods

Method Description
_getLabel ( ) : string Return the flag label.

Method Details

__get() public method

public __get ( $name )

__set() public method

Set properties.
public __set ( string $name, string $value )
$name string Available properties: - bgcolor: (string) The background color.
$value string Property value.

__toString() public method

String representation of the object.
public __toString ( ) : string
return string String representation (Flag ID).

_getLabel() abstract protected method

Necessary evil as gettext strings can not be set directly to object properties.
abstract protected _getLabel ( ) : string
return string The label.

changed() public method

Given a list of flag objects, determines if this flag's status has changed.
public changed ( array $obs, boolean $add ) : mixed
$obs array A list of IMP_Flag_Base objects.
$add boolean True if these flags were added, false if they were removed.
return mixed Null if no change, true if flag is added, false if flag is removed.

getLabel() public method

Return the flag label.
public getLabel ( boolean $set = true ) : string
$set boolean Return label for setting the flag?
return string The label.

serialize() public method

public serialize ( )

unserialize() public method

public unserialize ( $data )

Property Details

$_bgcolor protected_oe property

The background color.
protected string $_bgcolor
return string

$_canset protected_oe property

Is this flag settable by the user?
protected bool $_canset
return boolean

$_css protected_oe property

The CSS class.
protected string $_css
return string

$_cssIcon protected_oe property

The CSS class for the icon.
protected string $_cssIcon
return string

$_id protected_oe property

Unique ID.
protected string $_id
return string