PHP Class PHPExiftool\RDFParser

Author: Romain Neutron ([email protected])
Mostra file Open project: romainneutron/PHPExiftool Class Usage Examples

Protected Properties

Property Type Description
$DOM
$DOMXpath
$XML
$registeredPrefixes

Public Methods

Method Description
ParseEntities ( ) : ArrayCollection Parse a XML string and returns an ArrayCollection of FileEntity
ParseMetadatas ( ) : MetadataBag Parse an Entity associated DOM, returns the metadatas
Query ( string $query ) : PHPExiftool\Driver\Value\ValueInterface Returns the first result for a user defined query against the RDF
__destruct ( )
close ( ) : RDFParser Close the current opened XML file and reset internals
open ( string $XML ) : RDFParser Opens an XML file for parsing

Protected Methods

Method Description
getDom ( ) : DOMDocument Compute the DOMDocument from the XML
getDomXpath ( ) : DOMXpath Compute the DOMXpath from the DOMDocument
getNamespacesFromXml ( DOMDocument $dom ) : array Extract all XML namespaces declared in a XML
normalize ( string $tagname ) : string Normalize a tagname based on namespaces redirections
readNodeValue ( DOMNode $node, PHPExiftool\Driver\TagInterface $tag = null ) : PHPExiftool\Driver\Value\ValueInterface Read the node value, decode it if needed

Method Details

ParseEntities() public method

Parse a XML string and returns an ArrayCollection of FileEntity
public ParseEntities ( ) : ArrayCollection
return Doctrine\Common\Collections\ArrayCollection

ParseMetadatas() public method

Parse an Entity associated DOM, returns the metadatas
public ParseMetadatas ( ) : MetadataBag
return PHPExiftool\Driver\Metadata\MetadataBag

Query() public method

Returns the first result for a user defined query against the RDF
public Query ( string $query ) : PHPExiftool\Driver\Value\ValueInterface
$query string
return PHPExiftool\Driver\Value\ValueInterface The value

__destruct() public method

public __destruct ( )

close() public method

Close the current opened XML file and reset internals
public close ( ) : RDFParser
return RDFParser

getDom() protected method

Compute the DOMDocument from the XML
protected getDom ( ) : DOMDocument
return DOMDocument

getDomXpath() protected method

Compute the DOMXpath from the DOMDocument
protected getDomXpath ( ) : DOMXpath
return DOMXpath The DOMXpath object related to the XML

getNamespacesFromXml() protected static method

Extract all XML namespaces declared in a XML
protected static getNamespacesFromXml ( DOMDocument $dom ) : array
$dom DOMDocument
return array The namespaces declared in XML

normalize() protected method

Normalize a tagname based on namespaces redirections
protected normalize ( string $tagname ) : string
$tagname string The tagname to normalize
return string The normalized tagname

open() public method

Opens an XML file for parsing
public open ( string $XML ) : RDFParser
$XML string
return RDFParser

readNodeValue() protected method

Read the node value, decode it if needed
protected readNodeValue ( DOMNode $node, PHPExiftool\Driver\TagInterface $tag = null ) : PHPExiftool\Driver\Value\ValueInterface
$node DOMNode The node to read
$tag PHPExiftool\Driver\TagInterface The tag associated
return PHPExiftool\Driver\Value\ValueInterface The value extracted

Property Details

$DOM protected_oe property

protected $DOM

$DOMXpath protected_oe property

protected $DOMXpath

$XML protected_oe property

protected $XML

$registeredPrefixes protected_oe property

protected $registeredPrefixes