jDaoParser
in package
extract data from a dao xml content
Tags
Table of Contents
- $hasOnlyPrimaryKeys : mixed
- $selector : mixed
- $_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
- 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
= alse
$selector
public
mixed
$selector
$_eventList
list of main events to sent
private
mixed
$_eventList
= array()
$_ijoins
code name of foreign table with a inner join
private
array<string|int, string>
$_ijoins
= array()
list of table code name
$_importedDao
selector of the imported dao
private
array<string|int, jSelectorDao>
$_importedDao
=
ull
$_methods
private
array<string|int, jDaoMethod>
$_methods
= array()
$_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)
$_primaryTable
primary table code name
private
string
$_primaryTable
= ''
$_properties
the properties list.
private
array<string|int, jDaoProperty>
$_properties
= array()
keys = field code name
$_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()
$_userRecord
selector of the user record class
private
jSelectorDaoRecord
$_userRecord
=
ull
Methods
__construct()
public
__construct(jSelectorDao $selector) : mixed
Parameters
- $selector : jSelectorDao
-
the selector of the DAO file
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
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
Return values
bool —true / false
getEvents()
public
getEvents() : mixed
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>
Return values
array<string|int, jSelectorDao> —getInnerJoins()
list of code name of foreign tables with a inner join
public
getInnerJoins() : array<string|int, string>
Return values
array<string|int, string> —the list
getMethods()
public
getMethods() : array<string|int, jDaoMethod>
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>>
Return values
array<string|int, array<string|int, mixed>> —list of array(table code name, 0)
getPrimaryTable()
public
getPrimaryTable() : string
Return values
string —the primary table code name
getProperties()
the properties list.
public
getProperties() : array<string|int, jDaoProperty>
keys = field code name
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>
Return values
array<string|int, mixed> —getUserRecord()
selector of the user record class
public
getUserRecord() : jSelectorDaoRecord
Return values
jSelectorDaoRecord —hasEvent()
public
hasEvent(mixed $event) : mixed
Parameters
- $event : mixed
Return values
mixed —parse()
parse a dao xml content
public
parse(SimpleXmlElement $xml, jDbTools $tools) : mixed
Parameters
- $xml : SimpleXmlElement
- $tools : jDbTools
Return values
mixed —import()
protected
import(mixed $xml, mixed $tools) : mixed
Parameters
- $xml : mixed
- $tools : mixed
Return values
mixed —parseDatasource()
protected
parseDatasource(mixed $xml) : mixed
Parameters
- $xml : mixed
Return values
mixed —parseFactory()
protected
parseFactory(mixed $xml) : mixed
Parameters
- $xml : mixed
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