This object is used for demonstration purposes of RPC with Flex.
In Flex I will connect to this object via the default AMFChannel. An example of setting up the Channel is available on this website.
Make sure you check (expand the method) token_call and insert_date for additional tags that I have used.
|copyright||20 January 2013|
|link||View the contents of this file.|
|TODO||tidy up the code a bit more, and add some private / protected methods for demonstration.|
__construct() : void
An extended longer version is written here. It is shown when you click on the thingy...
get_all_records() : array
Returns all the records in the table.
get_date() : \VO\DataLine
This method demonstrates how to create a Date in PHP and pass it to Flex using AMFphp
get_record_at(int $p_index_id) : \DataLine
Returns a record based on the primary key that is passed in. If no entry exists, then an empty object is returned.
primary key of the record you wish to retrieve
insert_date(\DataLine $p_data) : void
A sample method that has been written to test inserting a date into a MySQL database from Flex. Make sure you check out the valid string formats for creating Flex Dates.
var trial : DataLineFlex = new DataLineFlex(); trial.some_char = 'trial of AMFPHP'; trial.some_int = 9; trial.some_date = new Date("Wed Apr 25 2012 4:00:00 PM"); Bravo.insert_date(trial);
object containing the data to be inserted into the table
insert_record(\DataLine $p_data) : array
Inserts a DataLine object into Table1
token_call(string $p_letter) : string
A method that has been designed to test the ASyncToken class from Flex.
When the button is hit in rapid succession, ABC is passed to PHP. BAC is returned to Flex based on the time delay.
a letter of either A, B or C
stringa simple statement is returned.
$dbc : resource