EO_Booking_Form_JSON_Visitor
since 2.0.0
Pro
Generates a "JSON" array of the booking form
$visitor = new EO_Booking_Form_JSON_Visitor();
$form->accept( $visitor );
$json = $visitor->get_json();
Methods
public |
#
__construct( )
|
public |
#
get_json( )
|
public |
#
visit( $element )
Store elements data
|
public |
#
visit_enter( $element )
Store elements data and move pointer to 'elements' key for children
|
public |
#
visit_leave( $element )
Move pointer to parent, by going through the path.
|
private |
#
_to_array( $element )
Helper function to cast an element to array
|
Properties
protected
|
$json
|
The generate "JSON" array
|
protected
|
$pointer
|
The current place to add data to. This will reference a sub-array in $this->json.
|
protected
|
$path
|
The path (array of array indexes in $this->json) to the current pointer
|
Hooks
Changelog