jDaoParser

extract data from a dao xml content

package

jelix

subpackage

dao

see

Methods

__construct

__construct(\jSelectorDao $selector) 

Arguments

$selector

\jSelectorDao

the selector of the DAO file

parse a join definition

_parseTable(integer $typetable, \simpleXmlElement $tabletag) 

Arguments

$typetable

integer

$tabletag

\simpleXmlElement

Try to read all given attributes

getAttr(\SimpleXmlElement $tag, array $requiredattr) : array

Arguments

$tag

\SimpleXmlElement

$requiredattr

array

attributes list

Response

array

attributes and their values

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

getBool( $value) : boolean

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

Arguments

$value

Response

boolean

true / false

getEvents

getEvents() 

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

getImportedDao() : array<mixed,\jSelectorDao>

Response

array<mixed,\jSelectorDao>

list of code name of foreign tables with a inner join

getInnerJoins() : array

Response

array

the list

getMethods

getMethods() : array<mixed,\jDaoMethod>

Response

array<mixed,\jDaoMethod>

list of jDaoMethod objects

list of code name of foreign table with a outer join

getOuterJoins() : array

Response

array

list of array(table code name, 0)

getPrimaryTable

getPrimaryTable() : string

Response

string

the primary table code name

the properties list.

getProperties() : array

keys = field code name values = jDaoProperty

Response

array

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)

getTables() : array

Response

array

selector of the user record class

getUserRecord() : \jSelectorDaoRecord

hasEvent

hasEvent( $event) 

Arguments

$event

import

import( $xml,  $tools) 

Arguments

$xml

$tools

parse a dao xml content

parse(\SimpleXmlElement $xml, \jDbTools $tools) 

Arguments

$xml

\SimpleXmlElement

$tools

\jDbTools

parseDatasource

parseDatasource( $xml) 

Arguments

$xml

parseFactory

parseFactory( $xml) 

Arguments

$xml

parseRecord

parseRecord(\simpleXmlElement $xml, \jDbTools $tools) 
Throws
\jDaoXmlException

Arguments

$xml

\simpleXmlElement

$tools

\jDbTools

Properties

the properties list.

_properties : 

keys = field code name values = jDaoProperty

Type(s)

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)

_tables : 

Type(s)

primary table code name

_primaryTable : 

Type(s)

code name of foreign table with a outer join

_ojoins : array
var

list of array(table code name, 0)

Type(s)

array

code name of foreign table with a inner join

_ijoins : array
var

list of table code name

Type(s)

array

list of jDaoMethod objects

_methods : array
var

list of jDaoMethod objects

Type(s)

array

list of main events to sent

_eventList : 

Type(s)

hasOnlyPrimaryKeys

hasOnlyPrimaryKeys : 

Type(s)

selector of the user record class

_userRecord : \jSelectorDaoRecord
var

Type(s)

\jSelectorDaoRecord

selector of the imported dao

_importedDao : array<mixed,\jSelectorDao>
var

Type(s)

array<mixed,\jSelectorDao>

selector

selector : 

Type(s)