File src/Controller/DataReader.php
class Phad\DataReader
Grants access to an item's node & loads item list
See source code at /src/Controller/DataReader.php
Constants
Properties
-
protected \PDO $pdo; -
protected object $ItemInfo; -
protected array $data_node_info; -
protected \Phad $phad;
Methods
-
public function __construct(array $data_node_info, object $ItemInfo, \PDO $pdo=null, \Phad $phadnull) -
public function get_default_form_data()Query for a row with id matching$_GET['id'], return aPhad\BlackHoleobject if no id passed, or return$_POSTif mode isFORM_SUBMIT. -
public function get_data_loader_rows()Execute the data loader declared on the data node, and return the result. -
public function get_queried_rows()Build a query based on the data node, execute it, and return the rows -
public function get_rows(): arrayProcess the ItemInfo and Data Node, and return the appropriate data. -
static public function build_sql(string $table_name, array $data_node_info, array $args, $binds)Build an SQL query and an array of bindable key/value pairs to pass toPDOSatement::execute($binds)
If your SQL contains bindable params like :get.id, then this will be filled by $_GET['id']. Bindable params like :some_name are filled by $args['some_name']