Class jDaoParser

Description

extract data from a dao xml content

Located in /dao/jDaoParser.class.php (line 27)


	
			
Variable Summary
Method Summary
jDaoParser __construct ( $selector)
array getAttr (SimpleXmlElement $tag, array $requiredattr)
boolean getBool ( $value)
void getEvents ()
jSelectorDao[] getImportedDao ()
array getInnerJoins ()
jDaoMethod[] getMethods ()
void getOuterJoins ()
string getPrimaryTable ()
array getProperties ()
array getTables ()
void hasEvent ( $event)
void import ( $xml,  $tools)
void parse (SimpleXmlElement $xml, jDbTools $tools, int $debug)
void parseDatasource ( $xml)
void parseFactory ( $xml)
void parseRecord ( $xml,  $tools)
Variables
mixed $hasOnlyPrimaryKeys = false (line 73)
  • access: public
mixed $selector (line 87)
  • access: public
Methods
Constructor __construct (line 91)

Constructor

jDaoParser __construct ( $selector)
  • $selector
getAttr (line 292)

Try to read all given attributes

  • return: attributes and their values
  • access: public
array getAttr (SimpleXmlElement $tag, array $requiredattr)
  • SimpleXmlElement $tag
  • array $requiredattr: attributes list
getBool (line 309)

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

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

  • return: true / false
  • access: public
boolean getBool ( $value)
  • $value
getEvents (line 355)
  • access: public
void getEvents ()
getImportedDao (line 369)

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

  • access: public
jSelectorDao[] getImportedDao ()
getInnerJoins (line 353)

list of code name of foreign tables with a inner join

  • return: the list
  • access: public
array getInnerJoins ()
getMethods (line 341)
  • return: list of jDaoMethod objects
  • access: public
jDaoMethod[] getMethods ()
getOuterJoins (line 347)

list of code name of foreign table with a outer join

  • var: list of array(table code name, 0)
  • access: public
void getOuterJoins ()
getPrimaryTable (line 336)
  • return: the primary table code name
  • access: public
string getPrimaryTable ()
getProperties (line 319)

the properties list.

keys = field code name values = jDaoProperty

  • access: public
array getProperties ()
getTables (line 331)

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)

  • access: public
array getTables ()
getUserRecord (line 362)

selector of the user record class

  • access: public
jSelectorDaoRecord getUserRecord ()
hasEvent (line 356)
  • access: public
void hasEvent ( $event)
  • $event
import (line 108)
  • access: protected
void import ( $xml,  $tools)
  • $xml
  • $tools
parse (line 101)

parse a dao xml content

  • access: public
void parse (SimpleXmlElement $xml, jDbTools $tools, int $debug)
  • SimpleXmlElement $xml
  • jDbTools $tools
  • int $debug: for debug only 0:parse all, 1:parse only datasource+record, 2;parse only datasource
parseDatasource (line 142)
  • access: protected
void parseDatasource ( $xml)
  • $xml
parseFactory (line 219)
  • access: protected
void parseFactory ( $xml)
  • $xml
parseRecord (line 176)
  • access: protected
void parseRecord ( $xml,  $tools)
  • $xml
  • $tools

Documentation generated on Wed, 04 Jan 2017 22:53:23 +0100 by phpDocumentor 1.4.3