(available from version 2.0 and applicable just to MixedConnector)
adds a configured connector object to a collection for further retrieving the entire collection from the server.
$conn->add($name, $config);
Parameters:
See also:
(available from version 1.5 and applicable just to DataConnector/JSONDataConnector)
adds the first child tag(section) to data.
$conn->add_section($name, $value);
Parameters:
See also:
(available from version 2.0)
allows getting data generated by dhtmlxConnector as a string. Once the functionality is activated, dhtmxConnector starts to return data as a string instead of direct loading into the client.
$conn->asString($isActive);
Parameters:
See also:
configures the connector without rendering data.
$conn->configure($table,$id,$text,$extra,$relation);
Parameters:
See also:
enables the dynamical loading mode for connector.
$conn->dynamic_loading([$rowsNum]);
Parameters:
See also:
enables logging for connector.
$conn->enable_log("path to log file");
Parameters:
See also:
(available from version 2.0)
filters a dataset on the server side.
$conn->filter($name,$value);
//or
$conn->filter($sql_str);
Parameters:
$value - the filtering criteria
$sql_str - the sql statement specifying the filtering logic See also:
returns current active mode.
$conn->is_select_mode();
Parameters:
Returns:
(available from version 2.0)
has 2 overloads:
1) adds a custom key:value pair(s) to all items of the dataset.
$conn->mix($key,$value);
Parameters:
2) provides querying data from two tables, based on a relationship between the specified columns in these tables. Used with render_table method that defines configuration of the primary table
$conn->mix($table, $config, array ($fkey => $pkey));
Parameters:
See also:
retrieves configured data from the server. Applicable just to MixedConnector.
$conn->render();
See also:
configures connector and retrieves data from a PHP array which can be filled by any kind of external logic.
$conn->render_array($data,$id,$text,$extra,$relation_id);
Parameters:
See Also:
configures connector and retrieves data based on provided SQL text.
$conn->render_sql($sql,$id,$text,$extra,$relation_id);
Parameters:
See Also:
configures connector and retrieves data based on provided SQL text.
Works similar to render_sql, but have 2 differences:
The method can be used to call stored procedures in the database.
$conn->render_complex_sql($sql,$id,$text,$extra,$relation_id);
Parameters:
See Also:
configures connector and retrieves data from single table.
$conn->render_table($table,$id,$text,$extra,$relation);
Parameters:
Description:
$conn->render_table($table);
See Also:
allows you to set encoding that will be applied to generated XML (default encoding is UTF-8).
$conn->set_encoding("iso-8859-1");
Parameters:
limits the number of data items that will be loaded to a component.
$conn->set_limit([$rowsNum]);
Parameters:
creates a collection of options (attaches OptionsConnector to gridConnector or schedulerConnector). Applicable to gridConnector or schedulerConnector only
$list = new OptionsConnector($res, $dbtype);//initializes OptionsConnector
$list->render_table(
"types",
"type_id",
"type_id(value),name(label)"
); //retrieves data from the 'types' table
$scheduler = new schedulerConnector(
$res,
$dbtype
);//initializes schedulerConnector
//attaches OptionsConnector to schedulerConnector
$scheduler->set_options("my_collection", $list);
Parameters:
(available from version 2.0)
sorts a dataset on the server side.
$conn->sort($name,$direction);
//or
$conn->sort($sql_str);
Parameters:
$direction - the sorting direction ("ASC" or "DESC")
$sql_str - the sql statement specifying the sorting logic
See also:
Back to top