PHP Class OpenGraph\Opengraph

Inheritance: implements Iterato\Iterator, implements Serializabl\Serializable, implements Countabl\Countable
Datei anzeigen Open project: euskadi31/opengraph

Protected Properties

Property Type Description
$_position integer
$storage ArrayObject

Public Methods

Method Description
__construct ( )
addMeta ( String $property, Mixed $content, String $position ) : Opengraph Add meta
clear ( ) : void Clear elements of storage
count ( ) : integer Count elements of an object
current ( ) : mixed Return the current element
getArrayCopy ( ) : Array Get array
getMeta ( String $property ) : Meta Get meta by property name
getMetas ( ) : ArrayObject
hasMeta ( String $property ) : boolean Check is meta exists
key ( ) : scalar Return the key of the current element
next ( ) : void Move forward to next element
removeMeta ( String $property ) : boolean Remove meta
rewind ( ) : void Rewind the Iterator to the first element
serialize ( ) : string String representation of object
unserialize ( string $data ) : void Constructs the object form string
valid ( ) : boolean Checks if current position is valid

Protected Methods

Method Description
_normalizeContent ( String $property, Mixed $content ) : Mixed Normalize content

Method Details

__construct() public method

public __construct ( )

_normalizeContent() protected method

Normalize content
protected _normalizeContent ( String $property, Mixed $content ) : Mixed
$property String
$content Mixed
return Mixed

addMeta() public method

Add meta
public addMeta ( String $property, Mixed $content, String $position ) : Opengraph
$property String
$content Mixed
$position String
return Opengraph

clear() public method

Clear elements of storage
public clear ( ) : void
return void

count() public method

Count elements of an object
public count ( ) : integer
return integer

current() public method

Return the current element
public current ( ) : mixed
return mixed

getArrayCopy() public method

Get array
public getArrayCopy ( ) : Array
return Array

getMeta() public method

Get meta by property name
public getMeta ( String $property ) : Meta
$property String
return Meta

getMetas() public method

public getMetas ( ) : ArrayObject
return ArrayObject

hasMeta() public method

Check is meta exists
public hasMeta ( String $property ) : boolean
$property String
return boolean

key() public method

Return the key of the current element
public key ( ) : scalar
return scalar

next() public method

Move forward to next element
public next ( ) : void
return void

removeMeta() public method

Remove meta
public removeMeta ( String $property ) : boolean
$property String
return boolean

rewind() public method

Rewind the Iterator to the first element
public rewind ( ) : void
return void

serialize() public method

String representation of object
public serialize ( ) : string
return string

unserialize() public method

Constructs the object form string
public unserialize ( string $data ) : void
$data string The string representation of the object.
return void

valid() public method

Checks if current position is valid
public valid ( ) : boolean
return boolean

Property Details

$_position protected_oe property

protected int $_position
return integer

$storage protected_oe static_oe property

protected static ArrayObject $storage
return ArrayObject