POT
POT
POT
Main menu

Download

Forum

SVN

Class: OTS_SpellsList

Source Location: /classes/OTS_SpellsList.php

Class OTS_SpellsList

Class Overview

Implements interfaces:

  • IteratorAggregate (internal interface)
  • Countable (internal interface)

Wrapper for spells list.

Wrapper for spells list. Note: Unlike other lists classes this one doesn't implement ArrayAccess interface because it contains three kinds of spells grouped into pararell arrays.

Located in /classes/OTS_SpellsList.php [line 30]



		
				Author(s):
		
API Tags:
Property-read:  array $runesList: List of rune spells.
Property-read:  array $instantsList: List of instant spells.
Property-read:  array $conjuresList: List of conjure spells.

Information Tags:
Tutorial:  data/ directory resources
Version:  0.1.0
Version:  0.1.5
Since:  0.1.0

Methods

[ Top ]
Constant Summary
SPELL_CONJURE   Conjure spell.
SPELL_INSTANT   Instant spell.
SPELL_RUNE   Rune spell.

[ Top ]
Method Summary
OTS_SpellsList   __construct()   Loads spells list.
int   count()   Number of all loaded spells.
OTS_Spell   getConjure()   Returns given conjure spell.
array   getConjuresList()   Returns list of conjure spells.
OTS_Spell   getInstant()   Returns given instant spell.
array   getInstantsList()   Returns list of instants.
AppendIterator   getIterator()   Iterator for all spells.
OTS_Spell   getRune()   Returns given rune spell.
array   getRunesList()   Returns list of runes.
bool   hasConjure()   Checks if conjure exists.
bool   hasInstant()   Checks if instant exists.
bool   hasRune()   Checks if rune exists.
mixed   __get()   Magic PHP5 method.
void   __set_state()   Magic PHP5 method.
string   __toString()   Returns string representation of object.

[ Top ]
Methods
Constructor __construct  [line 94]

  OTS_SpellsList __construct( string $file  )

Loads spells list.

Loads spells list.

Parameters:
string   $file:  Spells file name.

API Tags:
Access:  public

Information Tags:
Version:  0.1.0
Throws:  DOMException On DOM operation error.
Since:  0.1.0

[ Top ]
count  [line 318]

  int count( )

Number of all loaded spells.

Number of all loaded spells.


API Tags:
Return:  Amount of all spells.
Access:  public

Information Tags:
Version:  0.1.5
Version:  0.1.0
Since:  0.1.0
Since:  0.1.5

Implementation of:
Countable::count

[ Top ]
getConjure  [line 232]

  OTS_Spell getConjure( string $name  )

Returns given conjure spell.

Returns given conjure spell.

Parameters:
string   $name:  Spell name.

API Tags:
Return:  Conjure spell wrapper.
Access:  public

Information Tags:
Version:  0.1.3
Version:  0.1.0
Throws:  OutOfBoundsException If conjure does not exist.
Since:  0.1.0

[ Top ]
getConjuresList  [line 206]

  array getConjuresList( )

Returns list of conjure spells.

Returns list of conjure spells.


API Tags:
Return:  List of conjure spells names.
Access:  public

Information Tags:
Version:  0.1.0
Since:  0.1.0

[ Top ]
getInstant  [line 191]

  OTS_Spell getInstant( string $name  )

Returns given instant spell.

Returns given instant spell.

Parameters:
string   $name:  Spell name.

API Tags:
Return:  Instant spell wrapper.
Access:  public

Information Tags:
Version:  0.1.3
Version:  0.1.0
Throws:  OutOfBoundsException If instant does not exist.
Since:  0.1.0

[ Top ]
getInstantsList  [line 165]

  array getInstantsList( )

Returns list of instants.

Returns list of instants.


API Tags:
Return:  List of instant spells names.
Access:  public

Information Tags:
Version:  0.1.0
Since:  0.1.0

[ Top ]
getIterator  [line 302]

  AppendIterator getIterator( )

Iterator for all spells.

Iterator for all spells. Returned object will continousely iterate through all kind of spells.


API Tags:
Return:  Iterator for all spells.
Access:  public

Information Tags:
Version:  0.1.5
Version:  0.1.0
Since:  0.1.0
Since:  0.1.5

Implementation of:
IteratorAggregate::getIterator

[ Top ]
getRune  [line 150]

  OTS_Spell getRune( string $name  )

Returns given rune spell.

Returns given rune spell.

Parameters:
string   $name:  Rune name.

API Tags:
Return:  Rune spell wrapper.
Access:  public

Information Tags:
Version:  0.1.3
Version:  0.1.0
Throws:  OutOfBoundsException If rune does not exist.
Since:  0.1.0

[ Top ]
getRunesList  [line 124]

  array getRunesList( )

Returns list of runes.

Returns list of runes.


API Tags:
Return:  List of rune names.
Access:  public

Information Tags:
Version:  0.1.0
Since:  0.1.0

[ Top ]
hasConjure  [line 219]

  bool hasConjure( string $name  )

Checks if conjure exists.

Checks if conjure exists.

Parameters:
string   $name:  Conjure name.

API Tags:
Return:  If conjure is set then true.
Access:  public

Information Tags:
Version:  0.1.3
Version:  0.1.0
Since:  0.1.0
Since:  0.1.3

[ Top ]
hasInstant  [line 178]

  bool hasInstant( string $name  )

Checks if instant exists.

Checks if instant exists.

Parameters:
string   $name:  Instant name.

API Tags:
Return:  If instant is set then true.
Access:  public

Information Tags:
Version:  0.1.3
Version:  0.1.0
Since:  0.1.0
Since:  0.1.3

[ Top ]
hasRune  [line 137]

  bool hasRune( string $name  )

Checks if rune exists.

Checks if rune exists.

Parameters:
string   $name:  Rune name.

API Tags:
Return:  If rune is set then true.
Access:  public

Information Tags:
Version:  0.1.3
Version:  0.1.0
Since:  0.1.0
Since:  0.1.3

[ Top ]
__get  [line 249]

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

[ Top ]
__set_state  [line 75]

  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.1.0
Since:  0.1.0

[ Top ]
__toString  [line 278]

  string __toString( )

Returns string representation of object.

Returns string representation of object. If any display driver is currently loaded then it uses it's method.


API Tags:
Return:  String representation of object.
Access:  public

Information Tags:
Version:  0.1.3
Version:  0.1.0
Since:  0.1.0
Since:  0.1.3

[ Top ]
Constants
SPELL_CONJURE = 2 [line 43]

Conjure spell.

Conjure spell.

Information Tags:
Version:  0.1.0
Since:  0.1.0

[ Top ]
SPELL_INSTANT = 1 [line 39]

Instant spell.

Instant spell.

Information Tags:
Version:  0.1.0
Since:  0.1.0

[ Top ]
SPELL_RUNE = 0 [line 35]

Rune spell.

Rune spell.

Information Tags:
Version:  0.1.0
Since:  0.1.0

[ Top ]