Jelix 1.8.14-pre

jDaoParser
in package

extract data from a dao xml content.

Tags
subpackage

dao

see
jDaoCompiler

Table of Contents

$hasOnlyPrimaryKeys  : mixed
$selector  : jSelectorDao
$_eventList  : mixed
list of main events to sent.
$_ijoins  : array<string|int, string>
code name of foreign table with a inner join.
$_importedDao  : array<string|int, jSelectorDao>
selector of the imported dao.
$_methods  : array<string|int, jDaoMethod>
$_ojoins  : array<string|int, array<string|int, mixed>>
code name of foreign table with a outer join.
$_primaryTable  : string
primary table code name.
$_properties  : array<string|int, jDaoProperty>
the properties list.
$_tables  : array<string|int, array<string|int, mixed>>
all tables with their properties, and their own fields keys = table code name values = array() 'name'=> table code name, 'realname'=>'real table name', 'pk'=> primary keys list 'fk'=> foreign keys list 'fields'=>array(list of field code name).
$_userRecord  : jSelectorDaoRecord
selector of the user record class.
__construct()  : mixed
Constructor.
getAttr()  : array<string|int, string>
Try to read all given attributes.
getBool()  : bool
just a quick way to retrieve boolean values from a string.
getEvents()  : mixed
getImportedDao()  : array<string|int, jSelectorDao>
selector of the imported dao. If can return several selector, if an imported dao import itself an other dao etc.
getInnerJoins()  : array<string|int, string>
list of code name of foreign tables with a inner join.
getMethods()  : array<string|int, jDaoMethod>
getOuterJoins()  : array<string|int, array<string|int, mixed>>
list of code name of foreign table with a outer join.
getPrimaryTable()  : string
getProperties()  : array<string|int, jDaoProperty>
the properties list.
getTables()  : array<string|int, mixed>
all tables with their properties, and their own fields keys = table code name values = array() 'name'=> table code name, 'realname'=>'real table name', 'pk'=> primary keys list 'fk'=> foreign keys list 'fields'=>array(list of field code name).
getUserRecord()  : jSelectorDaoRecord
selector of the user record class.
hasEvent()  : mixed
parse()  : mixed
parse a dao xml content.
import()  : mixed
parseDatasource()  : mixed
parseFactory()  : mixed
parseRecord()  : mixed
_parseTable()  : mixed
parse a join definition.

Properties

$_eventList

list of main events to sent.

private mixed $_eventList = array()
Tags

$_ijoins

code name of foreign table with a inner join.

private array<string|int, string> $_ijoins = array()

list of table code name

Tags

$_ojoins

code name of foreign table with a outer join.

private array<string|int, array<string|int, mixed>> $_ojoins = array()

list of array(table code name, 0)

Tags

$_primaryTable

primary table code name.

private string $_primaryTable = ''
Tags

$_tables

all tables with their properties, and their own fields keys = table code name values = array() 'name'=> table code name, 'realname'=>'real table name', 'pk'=> primary keys list 'fk'=> foreign keys list 'fields'=>array(list of field code name).

private array<string|int, array<string|int, mixed>> $_tables = array()
Tags

Methods

getAttr()

Try to read all given attributes.

public getAttr(SimpleXmlElement $tag, array<string|int, string> $requiredattr) : array<string|int, string>
Parameters
$tag : SimpleXmlElement
$requiredattr : array<string|int, string>

attributes list

Tags
Return values
array<string|int, string>

attributes and their values

getBool()

just a quick way to retrieve boolean values from a string.

public getBool(mixed $value) : bool

will accept yes, true, 1 as "true" values all other values will be considered as false.

Parameters
$value : mixed
Tags
Return values
bool

true / false

getImportedDao()

selector of the imported dao. If can return several selector, if an imported dao import itself an other dao etc.

public getImportedDao() : array<string|int, jSelectorDao>
Tags
Return values
array<string|int, jSelectorDao>

getInnerJoins()

list of code name of foreign tables with a inner join.

public getInnerJoins() : array<string|int, string>
Tags
Return values
array<string|int, string>

the list

getOuterJoins()

list of code name of foreign table with a outer join.

public getOuterJoins() : array<string|int, array<string|int, mixed>>
Tags
Return values
array<string|int, array<string|int, mixed>>

list of array(table code name, 0)

getPrimaryTable()

public getPrimaryTable() : string
Tags
Return values
string

the primary table code name

getTables()

all tables with their properties, and their own fields keys = table code name values = array() 'name'=> table code name, 'realname'=>'real table name', 'pk'=> primary keys list 'fk'=> foreign keys list 'fields'=>array(list of field code name).

public getTables() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>

hasEvent()

public hasEvent(mixed $event) : mixed
Parameters
$event : mixed
Tags
Return values
mixed

parse()

parse a dao xml content.

public parse(SimpleXmlElement $xml, jDbTools $tools) : mixed
Parameters
$xml : SimpleXmlElement
$tools : jDbTools
Tags
Return values
mixed

import()

protected import(mixed $xml, mixed $tools) : mixed
Parameters
$xml : mixed
$tools : mixed
Tags
Return values
mixed

parseDatasource()

protected parseDatasource(mixed $xml) : mixed
Parameters
$xml : mixed
Tags
Return values
mixed

parseFactory()

protected parseFactory(mixed $xml) : mixed
Parameters
$xml : mixed
Tags
Return values
mixed

_parseTable()

parse a join definition.

private _parseTable(int $typetable, simpleXmlElement $tabletag) : mixed
Parameters
$typetable : int
$tabletag : simpleXmlElement
Tags
Return values
mixed

Search results