Ubiquity
2.0.0
php rapid development framework
YumlModelsCreator.php
Go to the documentation of this file.
1
<?php
2
namespace
Ubiquity\orm\creator\yuml
;
3
4
use
Ubiquity\orm\creator\ModelsCreator
;
5
6
7
class
YumlModelsCreator
extends
ModelsCreator
{
11
private
$yumlParser
;
12
13
protected
function
init
(
$config
){
14
parent::init(
$config
);
15
}
16
17
public
function
initYuml
($yumlString) {
18
$this->yumlParser=
new
YumlParser
($yumlString);
19
}
20
21
22
protected
function
getTablesName
(){
23
return
$this->yumlParser->getTableNames();
24
}
25
26
protected
function
getFieldsInfos
($tableName) {
27
$fieldsInfos=array();
28
$fields = $this->yumlParser->getFields($tableName);
29
foreach
($fields as $field) {
30
$fieldsInfos[$field[
'name'
]] = [
"Type"
=>$field[
'type'
],
"Nullable"
=>(isset($field[
"null"
]) && $field[
"null"
])];
31
}
32
return
$fieldsInfos;
33
}
34
35
protected
function
getPrimaryKeys
($tableName){
36
return
$this->yumlParser->getPrimaryKeys($tableName);
37
}
38
39
protected
function
getForeignKeys
($tableName,$pkName){
40
return
$this->yumlParser->getForeignKeys($tableName);
41
}
42
}
Ubiquity\orm\creator\yuml\YumlModelsCreator\getPrimaryKeys
getPrimaryKeys($tableName)
Definition:
YumlModelsCreator.php:35
Ubiquity\orm\creator\yuml\YumlModelsCreator\initYuml
initYuml($yumlString)
Definition:
YumlModelsCreator.php:17
Ubiquity\orm\creator\ModelsCreator
Definition:
ModelsCreator.php:12
ModelsCreator
Ubiquity\orm\creator\yuml\YumlModelsCreator
Definition:
YumlModelsCreator.php:7
Ubiquity\orm\creator\yuml\YumlModelsCreator\getForeignKeys
getForeignKeys($tableName, $pkName)
Definition:
YumlModelsCreator.php:39
Ubiquity\orm\creator\yuml\YumlModelsCreator\init
init($config)
Definition:
YumlModelsCreator.php:13
Ubiquity\orm\creator\yuml\YumlModelsCreator\$yumlParser
$yumlParser
Definition:
YumlModelsCreator.php:11
Ubiquity\orm\creator\yuml\YumlModelsCreator\getTablesName
getTablesName()
Definition:
YumlModelsCreator.php:22
Ubiquity\orm\creator\yuml\YumlParser
Definition:
YumlParser.php:5
Ubiquity\orm\creator\yuml\YumlModelsCreator\getFieldsInfos
getFieldsInfos($tableName)
Definition:
YumlModelsCreator.php:26
Ubiquity\orm\creator\ModelsCreator\$config
$config
Definition:
ModelsCreator.php:13
Ubiquity\orm\creator\yuml
Definition:
YumlModelsCreator.php:2
Ubiquity
orm
creator
yuml
YumlModelsCreator.php
Generated on Tue Mar 6 2018 04:43:20 for
Ubiquity
by
doxygen
1.8.13