Base
[ class tree: Base ] [ index: Base ] [ all elements ]

Class: order

Source Location: /objects/order.php

Class Overview


The root order function; mostly just holds information and loads objects for userOrder and processOrder


Author(s):

Variables

Methods


Child classes:

userOrder
An abstract class for handling user interactions with orders. Other classes are needed to generate the main options which go into the form and validate input, but this class loads the objects, sets variables, handles form elements common to all orders, and checks for order completeness.

Class Details

[line 28]
The root order function; mostly just holds information and loads objects for userOrder and processOrder



Tags:

abstract:  


[ Top ]


Class Variables

$country =

[line 52]

The country corresponding to this order



Tags:

access:  public

Type:   string


[ Top ]

$fromTerr =

[line 80]

A territory name from the fromTerr field



Tags:

access:  protected

Type:   string


[ Top ]

$fromTerritory =

[line 85]

The Territory object corresponding to the fromTerr field



Tags:

access:  protected

Type:   Territory


[ Top ]

$gameID =

[line 46]

The game ID corresponding to this order



Tags:

access:  protected

Type:   int


[ Top ]

$id =

[line 34]

The order ID



Tags:

access:  protected

Type:   int


[ Top ]

$toTerr =

[line 69]

A territory name from the toTerr field



Tags:

access:  protected

Type:   string


[ Top ]

$toTerritory =

[line 74]

The Territory object corresponding to the toTerr field



Tags:

access:  protected

Type:   Territory


[ Top ]

$type =

[line 40]

The type of order e.g. 'Hold', 'Support move', 'Destroy', 'Build Army'



Tags:

access:  protected

Type:   string


[ Top ]

$Unit =

[line 63]

The Unit object corresponding to the order's unitID field



Tags:

access:  protected

Type:   Unit


[ Top ]

$unitID =

[line 58]

The ID of the unit in the order; may or may not be fixed



Tags:

access:  protected

Type:   int


[ Top ]

$viaConvoy =

[line 92]

Whether or not this unit is moving via convoy (if applicable)



Tags:

var:  'Yes'/'No'
access:  protected

Type:   string


[ Top ]



Class Methods


constructor __construct [line 99]

order __construct( $row)

Create the order and initialize objects from a $row



Tags:

access:  protected


Overridden in child classes as:

userOrder::__construct()
Initialize this userOrder, this is called from the userOrder children
userOrderDiplomacy::__construct()
userOrderRetreats::__construct()
userOrderUnitPlacing::__construct()

Parameters:

array   $row  

[ Top ]

method isComplete [line 143]

bool isComplete( )

Return true if the order is complete, false otherwise



Tags:

access:  public


[ Top ]

method loadObject [line 116]

void loadObject( string $name, string|int $value)

Load an object corresponding to an entered class field. Used when inputting new data and when initializing the object (->set() and ->__construct()). If the input doesn't correspond to an object it is ignored.



Tags:

access:  protected


Parameters:

string   $name  
string|int   $value  

[ Top ]


Documentation generated on Thu, 13 Nov 2008 18:16:17 +0900 by phpDocumentor 1.4.1