c2ephp

PRAYFile Class Reference

Class representing a file that uses the PRAY format. More...

List of all members.

Public Member Functions

 PRAYFile ($reader=null)
 Creates a new PRAYFile.
 Compile ()
 Compiles the PRAYFile.
 AddBlock (PrayBlock $block)
 Adds a block to this PRAYFile.
 GetBlocks ($type=FALSE)
 Gets the blocks of the specified type(s)
 GetBlockByName ($name)
 Gets a block with the specified name.

Detailed Description

Class representing a file that uses the PRAY format.

.creature, .family and .agents files all use this format.

Definition at line 10 of file PRAYFile.php.


Member Function Documentation

PRAYFile::AddBlock ( PrayBlock block)

Adds a block to this PRAYFile.

Parameters:
$blockThe PrayBlock to add.

Definition at line 74 of file PRAYFile.php.

PRAYFile::Compile ( )

Compiles the PRAYFile.

Returns:
A binary string containing the PRAYFile's contents.

Definition at line 62 of file PRAYFile.php.

PRAYFile::GetBlockByName ( name)

Gets a block with the specified name.

This is mainly used when you want to get the PHOTBlock for a particular CreatureHistoryEvent, for example.

Definition at line 113 of file PRAYFile.php.

PRAYFile::GetBlocks ( type = FALSE)

Gets the blocks of the specified type(s)

If $type is a string, returns all blocks of that type.
If $type is an array, returns all blocks of the types in the array.

Parameters:
$typeThe type(s) of blocks to return, as the PRAYBLOCK_TYPE_* constants. (see PrayBlock for block types)

Definition at line 91 of file PRAYFile.php.

PRAYFile::PRAYFile ( reader = null)

Creates a new PRAYFile.

Parameters:
$readerThe IReader to read from. If null, means this is a user-generated PRAYFile.

Definition at line 26 of file PRAYFile.php.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations