POT
POT
POT
Main menu

Download

Forum

SVN

Class: OTS_FileLoader

Source Location: /classes/OTS_FileLoader.php

Class OTS_FileLoader

Class Overview

Universal OTServ binary formats reader.

Universal OTServ binary formats reader. This class is general class that handle node-based binary OTServ files. It provides no file format-related logic, only loading nodes from files. To open given file format you need to use proper class like OTS_OTBMFile or OTS_ItemsList classes.

This class is mostly usefull when you create own extensions for POT code.

Located in /classes/OTS_FileLoader.php [line 33]



		
				Author(s):
		
API Tags:
Property-write:  IOTS_FileCache $cacheDriver: Cache driver.

Information Tags:
Version:  0.1.3
Version:  0.0.6
Since:  0.0.6

Properties

Methods

[ Top ]
Descendants
Child Class Description
OTS_ItemsList Items list loader.
OTS_OTBMFile OTBM format reader.

[ Top ]
Constant Summary
ESCAPE_CHAR   Escape another special byte.
NODE_END   End of node.
NODE_START   Start of node.

[ Top ]
Property Summary
IOTS_FileCache   $cache   Cache handler.
OTS_FileNode   $root   Root node.

[ Top ]
Method Summary
static void   __set_state()   Magic PHP5 method.
void   loadFile()   Opens file.
void   setCacheDriver()   Sets cache handler.
void   __clone()   Creates clone of object.
void   __set()   Magic PHP5 method.
array   __sleep()   Magic PHP5 method.

[ Top ]
Properties
IOTS_FileCache   $cache [line 67]

Cache handler.

Cache handler.

API Tags:
Access:  protected

Information Tags:
Version:  0.0.6
Since:  0.0.6

[ Top ]
OTS_FileNode   $root [line 60]

Root node.

Root node.

API Tags:
Access:  protected

Information Tags:
Version:  0.0.6
Since:  0.0.6

[ Top ]
Methods
static method __set_state  [line 112]

  static void __set_state( array $properties  )

Magic PHP5 method.

Magic PHP5 method. Allows object importing from var_export().

Parameters:
array   $properties:  List of object properties.

API Tags:
Access:  public

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

[ Top ]
loadFile  [line 146]

  void loadFile( string $file  )

Opens file.

Opens file.

Parameters:
string   $file:  Filepath.

API Tags:
Access:  public

Information Tags:
Version:  0.1.3
Version:  0.0.6
Throws:  E_OTS_FileLoaderError When error occurs during file operation.
Since:  0.0.6

Redefined in descendants as:

[ Top ]
setCacheDriver  [line 134]

  void setCacheDriver( [IOTS_FileCache $cache = null]  )

Sets cache handler.

Sets cache handler. You have to set cache driver before loading/saving any file in order to apply it to that file.

Parameters:
IOTS_FileCache   $cache:  Cache handler (leave this parameter if you want to unset caching).

API Tags:
Access:  public

Information Tags:
Version:  0.0.6
Since:  0.0.6

[ Top ]
__clone  [line 95]

  void __clone( )

Creates clone of object.

Creates clone of object. Copy of object needs to have different ID.


API Tags:
Access:  public

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

[ Top ]
__set  [line 344]

  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.0
Version:  0.0.6
Throws:  OutOfBoundsException For non-supported properties.
Since:  0.1.0
Since:  0.0.6

[ Top ]
__sleep  [line 80]

  array __sleep( )

Magic PHP5 method.

Magic PHP5 method. Allows object serialisation.


API Tags:
Return:  List of properties that should be saved.
Access:  public

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

[ Top ]
Constants
ESCAPE_CHAR = 0xFD [line 46]

Escape another special byte.

Escape another special byte.

Information Tags:
Version:  0.0.6
Since:  0.0.6

[ Top ]
NODE_END = 0xFF [line 42]

End of node.

End of node.

Information Tags:
Version:  0.0.6
Since:  0.0.6

[ Top ]
NODE_START = 0xFE [line 38]

Start of node.

Start of node.

Information Tags:
Version:  0.0.6
Since:  0.0.6

[ Top ]