Ubiquity
2.5.2
php rapid development framework
Loading...
Searching...
No Matches
YumlModelsCreator.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ubiquity\orm\creator\yuml
;
4
5
use
Ubiquity\orm\creator\ModelsCreator
;
6
17
class
YumlModelsCreator
extends
ModelsCreator
{
22
private
$yumlParser
;
23
24
protected
function
init
(
$config
, $offset =
'default'
) {
25
parent::init (
$config
, $offset );
26
}
27
28
public
function
initYuml
($yumlString) {
29
$this->yumlParser =
new
YumlParser
( $yumlString );
30
}
31
32
protected
function
getTablesName
() {
33
return
$this->yumlParser->getTableNames ();
34
}
35
36
protected
function
getFieldsInfos
($tableName) {
37
$fieldsInfos = array ();
38
$fields = $this->yumlParser->getFields ( $tableName );
39
foreach
( $fields as $field ) {
40
$fieldsInfos [$field [
'name'
]] = [
"Type"
=> $field [
'type'
],
"Nullable"
=> (isset ( $field [
"null"
] ) && $field [
"null"
]) ];
41
}
42
return
$fieldsInfos;
43
}
44
45
protected
function
getPrimaryKeys
($tableName) {
46
return
$this->yumlParser->getPrimaryKeys ( $tableName );
47
}
48
49
protected
function
getForeignKeys
($tableName, $pkName,$dbName=
null
) {
50
return
$this->yumlParser->getForeignKeys ( $tableName );
51
}
52
}
Ubiquity\orm\creator\ModelsCreator
Definition
ModelsCreator.php:19
Ubiquity\orm\creator\ModelsCreator\$config
$config
Definition
ModelsCreator.php:23
Ubiquity\orm\creator\yuml\YumlModelsCreator
Definition
YumlModelsCreator.php:17
Ubiquity\orm\creator\yuml\YumlModelsCreator\$yumlParser
$yumlParser
Definition
YumlModelsCreator.php:22
Ubiquity\orm\creator\yuml\YumlModelsCreator\getForeignKeys
getForeignKeys($tableName, $pkName, $dbName=null)
Definition
YumlModelsCreator.php:49
Ubiquity\orm\creator\yuml\YumlModelsCreator\initYuml
initYuml($yumlString)
Definition
YumlModelsCreator.php:28
Ubiquity\orm\creator\yuml\YumlModelsCreator\getFieldsInfos
getFieldsInfos($tableName)
Definition
YumlModelsCreator.php:36
Ubiquity\orm\creator\yuml\YumlModelsCreator\getPrimaryKeys
getPrimaryKeys($tableName)
Definition
YumlModelsCreator.php:45
Ubiquity\orm\creator\yuml\YumlModelsCreator\getTablesName
getTablesName()
Definition
YumlModelsCreator.php:32
Ubiquity\orm\creator\yuml\YumlModelsCreator\init
init($config, $offset='default')
Definition
YumlModelsCreator.php:24
Ubiquity\orm\creator\yuml\YumlParser
Definition
YumlParser.php:13
Ubiquity\orm\creator\yuml
Definition
YumlModelsCreator.php:3
C:
Users
myadd
Documents
GitHub
ubiquity-doc-api
vendor
phpmv
ubiquity-dev
src
Ubiquity
orm
creator
yuml
YumlModelsCreator.php
Generated on Sun Dec 10 2023 15:04:08 for
Ubiquity
by
doxygen
1.9.8