POT
POT
POT
Main menu

Download

Forum

SVN

Class: OTS_FileNode

Source Location: /classes/OTS_FileNode.php

Class OTS_FileNode

Class Overview

OTServ binary file node representation.

OTServ binary file node representation. This file extends OTS_Buffer class for nodes tree logic with siblings and childs.

Located in /classes/OTS_FileNode.php [line 31]

OTS_Buffer
   |
   --OTS_FileNode
Author(s):
API Tags:
Property:  OTS_FileNode $next: Next sibling node.
Property:  OTS_FileNode $child: First child node.
Property:  int $type: Node type.

Information Tags:
Version:  0.1.2
Version:  0.0.6
Since:  0.0.6

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From OTS_Buffer

OTS_Buffer::$buffer
OTS_Buffer::$pos

Inherited From OTS_Buffer

OTS_Buffer::__construct()
Initializes new buffered reader.
OTS_Buffer::check()
Checks stream end state.
OTS_Buffer::getBuffer()
Returs properties stream.
OTS_Buffer::getChar()
Returns single byte.
OTS_Buffer::getLong()
Returns quater byte.
OTS_Buffer::getPos()
Returns current read position.
OTS_Buffer::getShort()
Returns double byte.
OTS_Buffer::getSize()
Returns buffer size.
OTS_Buffer::getString()
Returns string from buffer.
OTS_Buffer::isValid()
Checks if there is anything left in stream.
OTS_Buffer::putChar()
Appends single byte to buffer.
OTS_Buffer::putLong()
Appends quater byte to buffer.
OTS_Buffer::putShort()
Appends double byte to buffer.
OTS_Buffer::putString()
Appends string to buffer.
OTS_Buffer::reset()
Empties buffer.
OTS_Buffer::setBuffer()
Sets properties stream.
OTS_Buffer::setPos()
Seeks current reading position.
OTS_Buffer::skip()
Skips given amount of bytes.
OTS_Buffer::__clone()
Resets pointer of cloned object.
OTS_Buffer::__get()
Magic PHP5 method.
OTS_Buffer::__set()
Magic PHP5 method.
OTS_Buffer::__set_state()
Magic PHP5 method.
OTS_Buffer::__toString()
Returns string representation of buffer object.

[ Top ]
Method Summary
OTS_FileNode   getChild()   Returs first child.
OTS_FileNode   getNext()   Returs next sibling.
int   getType()   Returs node type.
void   setChild()   Sets first child.
void   setNext()   Sets next sibling.
void   setType()   Sets node type.
void   __clone()   Creates clone of object.
mixed   __get()   Magic PHP5 method.
void   __set()   Magic PHP5 method.

[ Top ]
Methods
getChild  [line 98]

  OTS_FileNode getChild( )

Returs first child.

Returs first child.


API Tags:
Return:  Child node.
Access:  public

Information Tags:
Version:  0.0.6
Since:  0.0.6

[ Top ]
getNext  [line 78]

  OTS_FileNode getNext( )

Returs next sibling.

Returs next sibling.


API Tags:
Return:  Sibling node.
Access:  public

Information Tags:
Version:  0.0.6
Since:  0.0.6

[ Top ]
getType  [line 118]

  int getType( )

Returs node type.

Returs node type.


API Tags:
Return:  Node type.
Access:  public

Information Tags:
Version:  0.0.6
Since:  0.0.6

[ Top ]
setChild  [line 108]

  void setChild( OTS_FileNode $child  )

Sets first child.

Sets first child.

Parameters:
OTS_FileNode   $child:  Child node.

API Tags:
Access:  public

Information Tags:
Version:  0.0.6
Since:  0.0.6

[ Top ]
setNext  [line 88]

  void setNext( OTS_FileNode $next  )

Sets next sibling.

Sets next sibling.

Parameters:
OTS_FileNode   $next:  Sibling node.

API Tags:
Access:  public

Information Tags:
Version:  0.0.6
Since:  0.0.6

[ Top ]
setType  [line 128]

  void setType( int $type  )

Sets node type.

Sets node type.

Parameters:
int   $type:  Node type.

API Tags:
Access:  public

Information Tags:
Version:  0.0.6
Since:  0.0.6

[ Top ]
__clone  [line 59]

  void __clone( )

Creates clone of object.

Creates clone of object. Creates complete tree copy by copying sibling and child nodes.


API Tags:
Access:  public

Information Tags:
Version:  0.0.6
Since:  0.0.6

Redefinition of:
OTS_Buffer::__clone()
Resets pointer of cloned object.

[ Top ]
__get  [line 143]

  mixed __get( string $name  )

Magic PHP5 method.

Magic PHP5 method.

Parameters:
string   $name:  Property name.

API Tags:
Return:  Property value.
Access:  public

Information Tags:
Version:  0.1.2
Version:  0.0.6
Throws:  E_OTS_OutOfBuffer When there is read attemp after end of stream.
Throws:  OutOfBoundsException For non-supported properties.
Since:  0.0.6
Since:  0.1.0

Redefinition of:
OTS_Buffer::__get()
Magic PHP5 method.

[ Top ]
__set  [line 167]

  void __set( string $name, mixed $value  )

Magic PHP5 method.

Magic PHP5 method.

Parameters:
string   $name:  Property name.
mixed   $value:  Property value.

API Tags:
Access:  public

Information Tags:
Version:  0.1.2
Version:  0.0.6
Throws:  OutOfBoundsException For non-supported properties.
Since:  0.1.0
Since:  0.0.6

Redefinition of:
OTS_Buffer::__set()
Magic PHP5 method.

[ Top ]