Xyndravandria Averazain  Alpha 0.0.0
 All Data Structures Namespaces Functions Variables
Averazain Class Reference

Static Public Member Functions

static AnchorRetrieved ()
 
static CallAnchoredMethod ()
 
static Execute ($Operation=0)
 
static FormData ($Index=null)
 
static JavaScript ()
 
static RegisterClass ($ClassName)
 
static RetrievedAnchor ()
 

Data Fields

const AutomaticallyRegisterClasses = 1
 

Static Private Member Functions

static Demask (&$Value)
 
static ExtractFormData ()
 
static GenerateJavaScript ()
 
static ProceedRequest ()
 
static RetrieveAnchor ()
 
static TargetAttached ($ResponseText)
 
static ValidateRegisteredClasses ()
 

Static Private Attributes

static $Anchor = array( )
 
static $ClassRegister = array( )
 
static $FormData = array( )
 
static $JavaScript = ''
 
static $RetrievedAnchor = null
 

Member Function Documentation

static AnchorRetrieved ( )
static

Checks whether there is an anchor retrieved.

Returns
boolean
static CallAnchoredMethod ( )
static

Calls the method of the retrieved anchor and returns its output.

Returns
mixed
static Demask ( $Value)
staticprivate

Demasks a given value sent within an Averazain request.

Parameters
string& $Value: The value to be demasked.
Returns
string
static Execute (   $Operation = 0)
static
Parameters
integer$Operation,:Used to influence the behaviour of Averazain::Execute( ). @ Averazain::AutomaticallyRegisterClasses - defines whether Averazain should automatically register all classes implementing PageCollection or not. If not defined, this has to be done manually using Averazain::RegisterClass( ).
Note
This method has to be called before any output is sent to the client!
static ExtractFormData ( )
staticprivate

Extracts the form data if sent and saves it into Averazain::$FormData.

static FormData (   $Index = null)
static

Returns either one element of Data::$FormData or the whole attribute.

Parameters
integer$Index,:Index of an element inside the Data::$FormData array.
Returns
array of mixed or mixed or null
Note
$Index is an optional parameter.
If not passed, Data::$FormData will be returned.
static GenerateJavaScript ( )
staticprivate

Turns the registered PHP classes in the $ClassRegister and its methods into correspondent JavaScript classes and methods which send an Ajax request to Averazain demanding to call the original PHP method and send its return value back to the client as an Ajax response which is, again, handled by Averazain.

static JavaScript ( )
static

Returns Averazain::$JavaScript.

Returns
string
static ProceedRequest ( )
staticprivate

Checks whether Averazain was called by an Ajax request and if yes, sends the demanded method's return value back to the client as an Ajax response which is, again, handled by Averazain.

Note
Calls Averazain::ExtractUniqueMethods( ).
static RegisterClass (   $ClassName)
static

Registers a class to Averazain.

Parameters
string$ClassName,:The class name to be registered.
static RetrieveAnchor ( )
staticprivate

Retrieves the anchor if it exists and then either returns the associated method's output directly to the client or saves the anchor into Averazain::$RetrievedAnchor.

static RetrievedAnchor ( )
static

Returns Averazain::$RetrievedAnchor.

Returns
null or array of mixed
static TargetAttached (   $ResponseText)
staticprivate

Checks whether a target is already attached to a response text.

Parameters
string$ResponseText,:The response text to be checked.
Returns
boolean
static ValidateRegisteredClasses ( )
staticprivate

Validates all registered classes and fills Averazain::$Anchor.

Field Documentation

$Anchor = array( )
staticprivate

The associations between anchors and method are saved within this array.

Type:
array of array of string
$ClassRegister = array( )
staticprivate

Holds all the class names which have been registered to Averazain using RegisterClass( ).

Type:
array of string
$FormData = array( )
staticprivate

Holds the form data which has been transferred through an Averazain request.
.

Type:
array of mixed
$JavaScript = ''
staticprivate

Holds the JavaScript generated by Averazain.

Type:
string
$RetrievedAnchor = null
staticprivate

The anchor retrieved by Averazain.

Type:
null or array of mixed
const AutomaticallyRegisterClasses = 1

Used to influence the behaviour of Averazain::Execute( ).