Overview

Packages

  • Actions
  • Codegen
  • Controls
    • Base
  • DatabaseAdapters
  • Events
  • None
  • Sessions
  • Tests

Classes

  • JqControlGen
  • QCodeGen
  • QCodeGenBase
  • QConvertNotation
  • QConvertNotationBase
  • QDatabaseCodeGen
  • QIndex
  • QManyToManyReference
  • QReference
  • QRestServiceCodeGen
  • QReverseReference
  • QSqlColumn
  • QSqlTable
  • QTypeTable
  • Overview
  • Package
  • Class

Class QDatabaseCodeGen

QBaseClass
Extended by QCodeGenBase
Extended by QCodeGen
Extended by QDatabaseCodeGen
Package: Codegen
Located at includes/codegen/QDatabaseCodeGen.class.php
Methods summary
public QSqlTable|QTypeTable
# GetTable( $strTableName )

Parameters

$strTableName

Returns

QSqlTable|QTypeTable

Throws

QCallerException
public
# GetColumn( $strTableName, $strColumnName )
public boolean
# ValidateTableColumn( string $strTableName, string $strColumnName )

Given a CASE INSENSITIVE table and column name, it will return TRUE if the Table/Column exists ANYWHERE in the already analyzed database

Given a CASE INSENSITIVE table and column name, it will return TRUE if the Table/Column exists ANYWHERE in the already analyzed database

Parameters

$strTableName
$strColumnName

Returns

boolean
true if it is found/validated
public
# GetTitle( )
public
# GetConfigXml( )
public
# GetReportLabel( )
public
# GenerateAll( )
public static
# GenerateAggregateHelper( $objCodeGenArray )
public
# __construct( $objSettingsXml )

Construct the QCodeGen object.

Construct the QCodeGen object.

Gives you an opportunity to read your xml file and make codegen changes accordingly.

Overrides

QCodeGen::__construct()
protected
# AnalyzeDatabase( )
protected
# ListOfColumnsFromTable( QSqlTable $objTable )
protected
# GetColumnArray( QSqlTable $objTable, $strColumnNameArray )
public
# GenerateTable( QSqlTable $objTable )
public
# GenerateTypeTable( QTypeTable $objTypeTable )
protected
# AnalyzeAssociationTable( $strTableName )
protected
# AnalyzeTypeTable( QTypeTable $objTypeTable )
protected
# AnalyzeTable( QSqlTable $objTable )
protected
# AnalyzeTableColumn( QDatabaseFieldBase $objField, $objTable )
protected
# StripPrefixFromTable( $strTableName )
protected
# GetForeignKeyForQcubedRelationshipDefinition( $strTableName, $strLine )
protected
# GetForeignKeyForSqlRelationshipDefinition( $strTableName, $strLine )
protected
# GetForeignKeyHelper( $strLine, $strFkName, $strTableName, $strColumnName, $strReferencedTable, $strReferencedColumn )
protected DatabaseForeignKeyBase[]
# GetForeignKeysFromRelationshipsScript( string $strTableName, DatabaseForeignKeyBase[] $objForeignKeyArray )

This will go through the various Relationships Script lines (if applicable) as setup during the __constructor() through the and tags in the configuration settings.

This will go through the various Relationships Script lines (if applicable) as setup during the __constructor() through the and tags in the configuration settings.

If no Relationships are defined, this method will simply exit making no changes.

Parameters

$strTableName
Name of the table to pull foreign keys for
$objForeignKeyArray
of currently found DB FK objects which will be appended to

Returns

DatabaseForeignKeyBase[]
Array of DB FK objects that were parsed out
public
# GenerateControlId( $objTable, $objColumn )
public string
# GetCastString( QSqlColumn $objColumn )

Returns a string that will cast a variable coming from the database into a php type. Doing this in the template saves significant amounts of time over using QType::Cast() or GetColumn.

Returns a string that will cast a variable coming from the database into a php type. Doing this in the template saves significant amounts of time over using QType::Cast() or GetColumn.

Parameters

$objColumn

Returns

string

Throws

Exception
public mixed
# __get( string $strName )

Override method to perform a property "Get" This will get the value of $strName

Override method to perform a property "Get" This will get the value of $strName

Parameters

$strName
Name of the property to get

Returns

mixed

Throws

Exception|QCallerException

Overrides

QCodeGenBase::__get()
public mixed|
# __set( string $strName, string $mixValue )

PHP magic method to set class properties

PHP magic method to set class properties

Parameters

$strName
$mixValue

Returns

mixed|

Throws

QUndefinedPropertyException

Overrides

QCodeGenBase::__set()
Methods inherited from QCodeGen
Pluralize()
Methods inherited from QCodeGenBase
CalculateGraphPrefixArray(), CalculateObjectDescription(), CalculateObjectDescriptionForAssociation(), CalculateObjectMemberVariable(), CalculateObjectPropertyName(), DataListControlClass(), DataListControlName(), DataListItemName(), DataListPropertyName(), DataListPropertyNamePlural(), DataListVarName(), EvaluatePHP(), GenerateAggregate(), GenerateFile(), GenerateFiles(), GetControlCodeGenerator(), GetDataListCodeGenerator(), GetSettingsXml(), ImplodeObjectArray(), LookupSetting(), ModelClassName(), ModelColumnPropertyName(), ModelColumnVariableName(), ModelConnectorControlClass(), ModelConnectorControlName(), ModelConnectorLabelVariableName(), ModelConnectorPropertyName(), ModelConnectorVariableName(), ModelReferenceColumnName(), ModelReferencePropertyName(), ModelReferenceVariableName(), ModelReverseReferenceVariableName(), ModelReverseReferenceVariableType(), ModelVariableName(), ParameterCleanupFromColumn(), ParameterListFromColumnArray(), ReportError(), Run(), TypeColumnPropertyName(), TypeTokenFromTypeName(), VariableTypeFromDbType(), buildTemplateArray(), getTemplateSettings(), setGeneratedFilePermissions()
Methods inherited from QBaseClass
OverrideAttributes(), __call()
Constants inherited from QCodeGenBase
DebugMode, PhpReservedWords
Properties summary
public $objSettingsXml
#
protected array|QSqlTable[] $objTableArray

Array of tables in the database

Array of tables in the database

#
protected $strExcludedTableArray
#
protected $objTypeTableArray
#
protected $strAssociationTableNameArray
#
protected QDatabaseBase $objDb

The database we are dealing with

The database we are dealing with

#
protected $intDatabaseIndex
#
protected string $strCommentConnectorLabelDelimiter

The delimiter to be used for parsing comments on the DB tables for being used as the name of ModelConnector's Label

The delimiter to be used for parsing comments on the DB tables for being used as the name of ModelConnector's Label

#
protected $strTypeTableSuffixArray
#
protected $intTypeTableSuffixLengthArray
#
protected $strAssociationTableSuffix
#
protected $intAssociationTableSuffixLength
#
protected $strStripTablePrefix
#
protected $intStripTablePrefixLength
#
protected $strExcludePattern
#
protected $strExcludeListArray
#
protected $strIncludePattern
#
protected $strIncludeListArray
#
protected $strAssociatedObjectPrefix
#
protected $strAssociatedObjectSuffix
#
protected boolean $blnManualQuerySupport
# false
protected $strRelationships
#
protected $blnRelationshipsIgnoreCase
#
protected $strRelationshipsScriptPath
#
protected $strRelationshipsScriptFormat
#
protected $blnRelationshipsScriptIgnoreCase
#
protected array $strRelationshipLinesQcubed
# array()
protected array $strRelationshipLinesSql
# array()
protected string $strPatternTableName
# '[[:alpha:]_][[:alnum:]_]*'
protected string $strPatternColumnName
# '[[:alpha:]_][[:alnum:]_]*'
protected string $strPatternKeyName
# '[[:alpha:]_][[:alnum:]_]*'
protected $blnGenerateControlId
#
protected $objModelConnectorOptions
#
protected $blnAutoInitialize
#
Properties inherited from QCodeGenBase
$ApplicationName, $CodeGenArray, $CreateMethod, $DefaultButtonClass, $DirectoriesToExcludeArray, $PreferredRenderMethod, $RootErrors, $SettingsFilePath, $SettingsXml, $SettingsXmlArray, $TemplateEscapeBegin, $TemplateEscapeBeginLength, $TemplateEscapeEnd, $TemplateEscapeEndLength, $TemplatePaths, $strClassPrefix, $strClassSuffix, $strErrors, $strWarnings
Magic properties inherited from QCodeGenBase
$Errors, $Warnings
API documentation generated by ApiGen