jDaoParser
in package
extract data from a dao xml content.
Tags
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
$hasOnlyPrimaryKeys
public
mixed
$hasOnlyPrimaryKeys
= \false
Tags
$selector
public
jSelectorDao
$selector
Tags
$_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
$_importedDao
selector of the imported dao.
private
array<string|int, jSelectorDao>
$_importedDao
Tags
$_methods
private
array<string|int, jDaoMethod>
$_methods
= array()
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
$_properties
the properties list.
private
array<string|int, jDaoProperty>
$_properties
= array()
keys = field code name.
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
$_userRecord
selector of the user record class.
private
jSelectorDaoRecord
$_userRecord
Tags
Methods
__construct()
Constructor.
public
__construct(jSelectorDao $selector) : mixed
Parameters
- $selector : jSelectorDao
-
the selector of the DAO file
Tags
Return values
mixed —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
getEvents()
public
getEvents() : mixed
Tags
Return values
mixed —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
getMethods()
public
getMethods() : array<string|int, jDaoMethod>
Tags
Return values
array<string|int, jDaoMethod> —list of jDaoMethod objects
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
getProperties()
the properties list.
public
getProperties() : array<string|int, jDaoProperty>
keys = field code name.
Tags
Return values
array<string|int, jDaoProperty> —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> —getUserRecord()
selector of the user record class.
public
getUserRecord() : jSelectorDaoRecord
Tags
Return values
jSelectorDaoRecord —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 —parseRecord()
protected
parseRecord(simpleXmlElement $xml, jDbTools $tools) : mixed
Parameters
- $xml : simpleXmlElement
- $tools : jDbTools
Tags
Return values
mixed —_parseTable()
parse a join definition.
private
_parseTable(int $typetable, simpleXmlElement $tabletag) : mixed
Parameters
- $typetable : int
- $tabletag : simpleXmlElement