Hoa central
Public Member Functions | List of all members
Hoa\Xml\Read Class Reference
Inheritance diagram for Hoa\Xml\Read:

Public Member Functions

 __construct (Stream\IStream\In $stream, $initializeNamespace=true, $entityResolver=null)
 
 eof ()
 
 read ($length)
 
 readString ($length)
 
 readCharacter ()
 
 readBoolean ()
 
 readInteger ($length=1)
 
 readFloat ($length=1)
 
 readArray ($argument=null)
 
 readLine ()
 
 readAll ($offset=0)
 
 scanf ($format)
 
 readDOM ()
 
- Public Member Functions inherited from Hoa\Xml\Xml
 __construct ($stream, Stream $innerStream, $initializeNamespace=true, $entityResolver=null)
 
 initializeNamespaces ()
 
 namespaceExists ($namespace)
 
 useNamespace ($namespace)
 
 getPrefix ($namespace)
 
 getNamespaces ()
 
 selectRoot ()
 
 selectAnyElements ()
 
 selectElements ($E=null)
 
 selectDescendantElements ($F=null)
 
 selectChildElements ($F=null)
 
 selectAdjacentSiblingElement ($F)
 
 selectSiblingElements ($F=null)
 
 querySelector ($query)
 
 querySelectorAll ($query)
 
 xpath ($path)
 
 __toString ()
 
 readAttributes ()
 
 readAttribute ($name)
 
 attributeExists ($name)
 
 readAttributesAsList ()
 
 readAttributeAsList ($name)
 
 readAttributesAsString ()
 
 readXML ()
 
 readDOM ()
 
 getName ()
 
 count ()
 
 getIterator ()
 
 __set ($name, $value)
 
 __get ($name)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 hasError ()
 
 getErrors ()
 
- Public Member Functions inherited from Hoa\Stream\Composite
 getInnerStream ()
 

Additional Inherited Members

- Protected Member Functions inherited from Hoa\Xml\Xml
 clearErrors ()
 
- Protected Member Functions inherited from Hoa\Stream\Composite
 setStream ($stream)
 
 getStream ()
 
 setInnerStream (Stream $innerStream)
 
- Protected Attributes inherited from Hoa\Xml\Xml
 $_namespaces = null
 
 $_errors = null
 
- Protected Attributes inherited from Hoa\Stream\Composite
 $_stream = null
 
 $_innerStream = null
 

Detailed Description

Class .

Read a XML element.

Definition at line 49 of file Read.php.

Constructor & Destructor Documentation

Hoa\Xml\Read::__construct ( Stream\IStream\In  $stream,
  $initializeNamespace = true,
  $entityResolver = null 
)

Start the stream reader as if it is a XML document.

Parameters
\Hoa\Stream\IStream\In$streamStream to read.
bool$initializeNamespaceWhether we initialize namespaces.
mixed$entityResolverEntity resolver.
Returns
void

Definition at line 61 of file Read.php.

65  {
66  parent::__construct(
67  '\Hoa\Xml\Element\Read',
68  $stream,
69  $initializeNamespace,
70  $entityResolver
71  );
72 
73  return;
74  }

Member Function Documentation

Hoa\Xml\Read::eof ( )

Test for end-of-file.

Returns
bool

Implements Hoa\Stream\IStream\In.

Definition at line 81 of file Read.php.

82  {
83  return $this->getStream()->eof();
84  }

Here is the call graph for this function:

Hoa\Xml\Read::read (   $length)

Read n characters.

Parameters
int$lengthLength.
Returns
string
Exceptions

Implements Hoa\Stream\IStream\In.

Definition at line 93 of file Read.php.

94  {
95  return $this->getStream()->read($length);
96  }

Here is the call graph for this function:

Hoa\Xml\Read::readAll (   $offset = 0)

Read all, i.e. read as much as possible.

Parameters
int$offsetOffset.
Returns
string

Implements Hoa\Stream\IStream\In.

Definition at line 178 of file Read.php.

179  {
180  return $this->getStream()->readAll($context);
181  }

Here is the call graph for this function:

Hoa\Xml\Read::readArray (   $argument = null)

Read the XML tree as an array.

Parameters
string$argumentNot use here.
Returns
array

Implements Hoa\Stream\IStream\In.

Definition at line 157 of file Read.php.

158  {
159  return $this->getStream()->readArray($argument);
160  }

Here is the call graph for this function:

Hoa\Xml\Read::readBoolean ( )

Read a boolean.

Returns
bool

Implements Hoa\Stream\IStream\In.

Definition at line 124 of file Read.php.

125  {
126  return $this->getStream()->readBoolean();
127  }

Here is the call graph for this function:

Hoa\Xml\Read::readCharacter ( )

Read a character.

Returns
string

Implements Hoa\Stream\IStream\In.

Definition at line 114 of file Read.php.

115  {
116  return $this->getStream()->readCharacter();
117  }

Here is the call graph for this function:

Hoa\Xml\Read::readDOM ( )

Read content as a DOM tree.

Returns

Definition at line 199 of file Read.php.

200  {
201  return $this->getStream()->readDOM();
202  }

Here is the call graph for this function:

Hoa\Xml\Read::readFloat (   $length = 1)

Read a float.

Parameters
int$lengthLength.
Returns
float

Implements Hoa\Stream\IStream\In.

Definition at line 146 of file Read.php.

147  {
148  return $this->getStream()->readFloat($length);
149  }

Here is the call graph for this function:

Hoa\Xml\Read::readInteger (   $length = 1)

Read an integer.

Parameters
int$lengthLength.
Returns
int

Implements Hoa\Stream\IStream\In.

Definition at line 135 of file Read.php.

136  {
137  return $this->getStream()->readInteger($length);
138  }

Here is the call graph for this function:

Hoa\Xml\Read::readLine ( )

Read a line.

Returns
string

Implements Hoa\Stream\IStream\In.

Definition at line 167 of file Read.php.

168  {
169  return $this->getStream()->readLine();
170  }

Here is the call graph for this function:

Hoa\Xml\Read::readString (   $length)

Alias of $this->read().

Parameters
int$lengthLength.
Returns
string

Implements Hoa\Stream\IStream\In.

Definition at line 104 of file Read.php.

105  {
106  return $this->getStream()->readString($length);
107  }

Here is the call graph for this function:

Hoa\Xml\Read::scanf (   $format)

Parse input from a stream according to a format.

Parameters
string$formatFormat (see printf's formats).
Returns
array

Implements Hoa\Stream\IStream\In.

Definition at line 189 of file Read.php.

190  {
191  return $this->getStream()->scanf($format);
192  }

Here is the call graph for this function:


The documentation for this class was generated from the following file: