Overview

Packages

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

Classes

  • AbstractControl_CodeGenerator
  • AjaxTimingForm
  • BBCodeParser
  • CalculatorForm
  • ComplexColumn
  • Event
  • ExampleForm
  • Examples
  • ExampleService
  • ExamplesForm
  • HtmlJqDoc
  • InjectForm
  • JavaScriptHelper
  • JqAttributes
  • JqDoc
  • JqIcon
  • Method
  • MyControl
  • MyQSlider_ChangeEvent
  • NavPanel
  • Option
  • Order
  • Project
  • ProjectPickerListBox
  • QAbstractCacheProvider
  • QAbstractHtmlTableColumn
  • QAbstractHtmlTableDataColumn
  • QAccordion_ActivateEvent
  • QAccordion_BeforeActivateEvent
  • QAccordion_CreateEvent
  • QAjaxResponse
  • QApplication
  • QApplicationBase
  • QArchive
  • QAutocomplete_ChangeEvent
  • QAutocomplete_CloseEvent
  • QAutocomplete_CodeGenerator
  • QAutocomplete_CreateEvent
  • QAutocomplete_FocusEvent
  • QAutocomplete_OpenEvent
  • QAutocomplete_ResponseEvent
  • QAutocomplete_SearchEvent
  • QAutocomplete_SelectEvent
  • QAutocomplete_SourceEvent
  • QAutocompleteBase_CodeGenerator
  • QAutocompleteListItem
  • QBaseClass
  • QBorderCollapse
  • QBorderStyle
  • QBrowserType
  • QCache
  • QCacheDeleteAction
  • QCacheDeleteAllAction
  • QCacheProviderAPC
  • QCacheProviderLocalMemory
  • QCacheProviderMemcache
  • QCacheProviderNoCache
  • QCacheProviderProxy
  • QCacheSetAction
  • QCalendarType
  • QCallType
  • QCausesValidation
  • QCheckBox_CodeGenerator
  • QCheckBoxBase_CodeGenerator
  • QCheckBoxList_CodeGenerator
  • QCheckBoxListBase_CodeGenerator
  • QControl_CodeGenerator
  • QControlBase_CodeGenerator
  • QControlCategoryType
  • QControlProxy
  • QCrossScripting
  • QCryptography
  • QCss
  • QCursor
  • QDatabaseFieldBase
  • QDatabaseResultBase
  • QDataGrid_CodeGenerator
  • QDataGridBase_CodeGenerator
  • QDatepicker_BeforeShowDayEvent
  • QDatepicker_BeforeShowEvent
  • QDatepicker_CalculateWeekEvent
  • QDatepicker_ChangeMonthYearEvent
  • QDatepicker_CloseEvent
  • QDatepicker_SelectEvent
  • QDatepicker_SelectEvent2
  • QDatepickerBox_BeforeShowDayEvent
  • QDatepickerBox_BeforeShowEvent
  • QDatepickerBox_CalculateWeekEvent
  • QDatepickerBox_ChangeMonthYearEvent
  • QDatepickerBox_CloseEvent
  • QDatepickerBox_CodeGenerator
  • QDatepickerBox_SelectEvent
  • QDatepickerBoxBase_CodeGenerator
  • QDateTime
  • QDateTimePicker_CodeGenerator
  • QDateTimePickerBase_CodeGenerator
  • QDateTimePickerFormat
  • QDateTimePickerType
  • QDateTimeSpan
  • QDbBackedFormStateHandler
  • QDialog_BeforeCloseEvent
  • QDialog_ButtonEvent
  • QDialog_CloseEvent
  • QDialog_CreateEvent
  • QDialog_DragEvent
  • QDialog_DragStartEvent
  • QDialog_DragStopEvent
  • QDialog_FocusEvent
  • QDialog_OpenEvent
  • QDialog_ResizeEvent
  • QDialog_ResizeStartEvent
  • QDialog_ResizeStopEvent
  • QDisplayStyle
  • QDraggable_CreateEvent
  • QDraggable_DragEvent
  • QDraggable_StartEvent
  • QDraggable_StopEvent
  • QDroppable_ActivateEvent
  • QDroppable_CreateEvent
  • QDroppable_DeactivateEvent
  • QDroppable_DropEvent
  • QDroppable_OutEvent
  • QDroppable_OverEvent
  • QEmailAttachment
  • QEmailMessage
  • QEmailServer
  • QEmailStringAttachment
  • QErrorAttribute
  • QFile
  • QFileAssetType
  • QFileFormStateHandler
  • QFloatTextBox_CodeGenerator
  • QFloatTextBoxBase_CodeGenerator
  • QFolder
  • QFormGen
  • QFormStateHandler
  • QGridLines
  • QHListControl
  • QHorizontalAlign
  • QHtml
  • QHtmlReporter
  • QHtmlTable_CodeGenerator
  • QHtmlTableCallableColumn
  • QHtmlTableCheckBoxColumn
  • QHtmlTableCheckBoxColumn_ClickEvent
  • QHtmlTableIndexedColumn
  • QHtmlTableLinkColumn
  • QHtmlTableNodeColumn
  • QHtmlTablePropertyColumn
  • QI18n
  • QImageType
  • QInformixPdoDatabaseField
  • QInformixPdoDatabaseResult
  • QInformixPdoDatabaseRow
  • QInstallationValidationResult
  • QInstallationValidator
  • QIntegerTextBox_CodeGenerator
  • QIntegerTextBoxBase_CodeGenerator
  • QJqButton_CreateEvent
  • QJqCheckBox_CreateEvent
  • QJqRadioButton_CreateEvent
  • QJsClosure
  • QJsFunction
  • QJsNoQuoteKey
  • QJsParameterList
  • QJsPriority
  • QJsVarName
  • QLabel_CodeGenerator
  • QLabelBase_CodeGenerator
  • QLexer
  • QListBox_CodeGenerator
  • QListBoxBase_CodeGenerator
  • QListControl_CodeGenerator
  • QListControlBase_CodeGenerator
  • QMenu
  • QMenu_BlurEvent
  • QMenu_CreateEvent
  • QMenu_FocusEvent
  • QMenu_SelectEvent
  • QMimeType
  • QModelConnectorArgumentType
  • QModelConnectorCreateType
  • QModelConnectorEditDlg
  • QModelConnectorOptions
  • QModelConnectorParam
  • QMultiLevelCacheProvider
  • QMySqlDatabaseResult
  • QNoScriptAjaxAction
  • QOracleDatabaseField
  • QOracleDatabaseResult
  • QOrderedListType
  • QOverflow
  • QPartialQueryBuilder
  • QPdoDatabaseResult
  • QPgConditionILike
  • QPgConditionJsonContains
  • QPgQ
  • QPosition
  • QPostgreSqlPdoDatabaseField
  • QPostgreSqlPdoDatabaseResult
  • QPostgreSqlPdoDatabaseRow
  • QProgressbar_ChangeEvent
  • QProgressbar_CompleteEvent
  • QProgressbar_CreateEvent
  • QQ
  • QQAggregationClause
  • QQAssociationNode
  • QQAverage
  • QQClause
  • QQColumnNode
  • QQCondition
  • QQConditionAll
  • QQConditionAnd
  • QQConditionBetween
  • QQConditionComparison
  • QQConditionEqual
  • QQConditionExists
  • QQConditionGreaterOrEqual
  • QQConditionGreaterThan
  • QQConditionIn
  • QQConditionIsNotNull
  • QQConditionIsNull
  • QQConditionLessOrEqual
  • QQConditionLessThan
  • QQConditionLike
  • QQConditionLogical
  • QQConditionNone
  • QQConditionNot
  • QQConditionNotBetween
  • QQConditionNotEqual
  • QQConditionNotExists
  • QQConditionNotIn
  • QQConditionNotLike
  • QQConditionOr
  • QQCount
  • QQDistinct
  • QQExpand
  • QQExpandAsArray
  • QQExpandVirtualNode
  • QQFunctionNode
  • QQGroupBy
  • QQHavingClause
  • QQLimitInfo
  • QQMathNode
  • QQMaximum
  • QQMinimum
  • QQNamedValue
  • QQNode
  • QQNoParentNode
  • QQOrderBy
  • QQReverseReferenceNode
  • QQSelect
  • QQSubQueryCountNode
  • QQSubQueryNode
  • QQSubQuerySqlNode
  • QQSum
  • QQTableNode
  • QQuery
  • QQueryBuilder
  • QQueryExpansion
  • QQVirtualNode
  • QRadioButtonList_CodeGenerator
  • QRadioButtonListBase_CodeGenerator
  • QRegex
  • QRepeatDirection
  • QRequestMode
  • QResizable_CreateEvent
  • QResizable_ResizeEvent
  • QResizable_StartEvent
  • QResizable_StopEvent
  • QResizeHandleDirection
  • QRssCategory
  • QRssFeed
  • QRssImage
  • QRssItem
  • QSampleTranslation
  • QSelectable_CreateEvent
  • QSelectable_SelectedEvent
  • QSelectable_SelectingEvent
  • QSelectable_StartEvent
  • QSelectable_StopEvent
  • QSelectable_UnselectedEvent
  • QSelectable_UnselectingEvent
  • QSelectionMode
  • QSelectMenu_ChangeEvent
  • QSelectMenu_CloseEvent
  • QSelectMenu_CreateEvent
  • QSelectMenu_FocusEvent
  • QSelectMenu_OpenEvent
  • QSelectMenu_SelectEvent
  • QSessionFormStateHandler
  • QSlider_ChangeEvent
  • QSlider_CodeGenerator
  • QSlider_CreateEvent
  • QSlider_SlideEvent
  • QSlider_StartEvent
  • QSlider_StopEvent
  • QSliderBase_CodeGenerator
  • QSoapMethod
  • QSoapParameter
  • QSoapService
  • QSortable_ActivateEvent
  • QSortable_BeforeStopEvent
  • QSortable_ChangeEvent
  • QSortable_CreateEvent
  • QSortable_DeactivateEvent
  • QSortable_OutEvent
  • QSortable_OverEvent
  • QSortable_ReceiveEvent
  • QSortable_RemoveEvent
  • QSortable_SortEvent
  • QSortable_StartEvent
  • QSortable_StopEvent
  • QSortable_UpdateEvent
  • QSpinner
  • QSpinner_ChangeEvent
  • QSpinner_CreateEvent
  • QSpinner_SpinEvent
  • QSpinner_StartEvent
  • QSpinner_StopEvent
  • QSqLite3PdoDatabaseField
  • QSqLite3PdoDatabaseResult
  • QSqLite3PdoDatabaseRow
  • QStack
  • QString
  • QTabs_ActivateEvent
  • QTabs_BeforeActivateEvent
  • QTabs_BeforeLoadEvent
  • QTabs_CreateEvent
  • QTabs_LoadEvent
  • QTag
  • QTestForm
  • QTextAlign
  • QTextBox_CodeGenerator
  • QTextBoxBase_CodeGenerator
  • QTextMode
  • QTimer
  • QTranslationPoParser
  • QType
  • QUnorderedListStyle
  • QVerticalAlign
  • QVirtualAttributeColumn
  • QWatcher
  • QWatcherBase
  • QWatcherCache
  • QWatcherDB
  • QWatcherNone
  • SampleComposite
  • SelectForm

Interfaces

  • ICacheAction
  • QDataList_CodeGenerator_Interface
  • QTranslationBase

Traits

  • QDataBinder
  • QModelTrait

Exceptions

  • QCallerException
  • QCryptographyException
  • QDataBindException
  • QDateTimeNullException
  • QEmailException
  • QIndexOutOfRangeException
  • QInformixPdoDatabaseException
  • QInvalidCastException
  • QInvalidFormStateException
  • QOptimisticLockingException
  • QPdoDatabaseException
  • QPoParserException
  • QPostgreSqlPdoDatabaseException
  • QRemoteAdminDeniedException
  • QSqLite3PdoDatabaseException
  • QUndefinedMethodException
  • QUndefinedPrimaryKeyException
  • QUndefinedPropertyException

Functions

  • __database_check_error
  • _b
  • _indent
  • _nl
  • _p
  • _r
  • _t
  • _tp
  • _tr
  • array_trim
  • beginsWith
  • CamelCaseFromDash
  • CastToInt
  • DisplayMonospacedText
  • endsWith
  • GO_BACK
  • jq_anytime_gen
  • jq_control_gen
  • jq_inc_gen
  • jq_indent
  • PrintExplainStatement
  • PrintInstructions
  • QcubedHandleCodeGenParseError
  • QcubedHandleError
  • QcubedHandleException
  • QCubedShutdown
  • QDateTimeErrorHandler
  • trimOffEnd
  • trimOffFront
  • Overview
  • Package
  • Class

Trait QModelTrait

Class QModelTrait

This trait class is a mixin helper for all the generated Model classes. It works together with the code generator to create particular functions that are common to all the classes. For historical reasons, and to prevent problems with polymorhpism, this is a trait and not a base class.

Located at includes/framework/QModelTrait.trait.php
Methods summary
protected static string
# BuildQueryStatement( QQueryBuilder & $objQueryBuilder, QQCondition $objConditions, QQClause[] $objOptionalClauses, mixed[] $mixParameterArray, boolean $blnCountOnly )

Takes a query builder object and outputs the sql query that corresponds to its structure and the given parameters.

Takes a query builder object and outputs the sql query that corresponds to its structure and the given parameters.

Parameters

$objQueryBuilder
$objQueryBuilder the QueryBuilder object that will be created
$objConditions
any conditions on the query, itself
$objOptionalClauses
additional optional QQClause object or array of QQClause objects for this query
$mixParameterArray
a array of name-value pairs to perform PrepareStatement with (sending in null will skip the PrepareStatement step)
$blnCountOnly
only select a rowcount

Returns

string
the query statement

Throws

QCallerException
Exception
protected static null|QModelBase
# _QuerySingle( QQCondition $objConditions, null $objOptionalClauses = null, mixed[] $mixParameterArray = null )

Static Qcubed Query method to query for a single ClassName ?> object. Uses BuildQueryStatment to perform most of the work. Is called by QuerySincle function of each object so that the correct return type will be put in the comments.

Static Qcubed Query method to query for a single ClassName ?> object. Uses BuildQueryStatment to perform most of the work. Is called by QuerySincle function of each object so that the correct return type will be put in the comments.

Parameters

$objConditions
any conditions on the query, itself
$objOptionalClauses
$mixParameterArray
a array of name-value pairs to perform PrepareStatement with

Returns

null|QModelBase
the queried object

Throws

Exception
QCallerException
protected static mixed[]
# _QueryArray( QQCondition $objConditions, QQClause[]|null $objOptionalClauses = null, mixed[]|null $mixParameterArray = null )

Static Qcubed Query method to query for an array of objects. Uses BuildQueryStatment to perform most of the work. Is called by QueryArray function of each object so that the correct return type will be put in the comments.

Static Qcubed Query method to query for an array of objects. Uses BuildQueryStatment to perform most of the work. Is called by QueryArray function of each object so that the correct return type will be put in the comments.

Parameters

$objConditions
any conditions on the query, itself
$objOptionalClauses
additional optional QQClause objects for this query
$mixParameterArray
an array of name-value pairs to substitute in to the placeholders in the query, if needed

Returns

mixed[]
an array of objects

Throws

Exception
QCallerException
public static QDatabaseResultBase
# QueryCursor( QQCondition $objConditions, QQClause[] $objOptionalClauses = null, mixed[] $mixParameterArray = null )

Static Qcubed query method to issue a query and get a cursor to progressively fetch its results. Uses BuildQueryStatment to perform most of the work.

Static Qcubed query method to issue a query and get a cursor to progressively fetch its results. Uses BuildQueryStatment to perform most of the work.

Parameters

$objConditions
any conditions on the query, itself
$objOptionalClauses
additional optional QQClause objects for this query
$mixParameterArray
an array of name-value pairs to substitute in to the placeholders in the query, if needed

Returns

QDatabaseResultBase
the cursor resource instance

Throws

Exception
QCallerException
public static integer
# QueryCount( QQCondition $objConditions, QQClause[] $objOptionalClauses = null, mixed[] $mixParameterArray = null )

Static Qcubed Query method to query for a count of objects. Uses BuildQueryStatment to perform most of the work.

Static Qcubed Query method to query for a count of objects. Uses BuildQueryStatment to perform most of the work.

Parameters

$objConditions
any conditions on the query, itself
$objOptionalClauses
additional optional QQClause objects for this query
$mixParameterArray
a array of name-value pairs to perform PrepareStatement with

Returns

integer
the count of queried objects as an integer
public static
# QueryArrayCached( QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null, $blnForceUpdate = false )
public static boolean|null
# ExpandArray( QDatabaseRowBase $objDbRow, string $strAliasPrefix, QQNode $objNode, QModelBase[] $objPreviousItemArray, string[] $strColumnAliasArray )

Do a possible array expansion on the given node. If the node is an ExpandAsArray node, it will add to the corresponding array in the object. Otherwise, it will follow the node so that any leaf expansions can be handled.

Do a possible array expansion on the given node. If the node is an ExpandAsArray node, it will add to the corresponding array in the object. Otherwise, it will follow the node so that any leaf expansions can be handled.

Parameters

$objDbRow
$strAliasPrefix
$objNode
$objPreviousItemArray
$strColumnAliasArray

Returns

boolean|null
Returns true if the we used the row for an expansion, false if we already expanded this node in a previous row, or null if no expansion data was found
public static null|object
# GetFromCache( $key )

Return an object corresponding to the given key, or null.

Return an object corresponding to the given key, or null.

The key might be null if: The table has no primary key, or SetSkipPrimaryKey was used in a query with QSelect.

Otherwise, the default here is to use the local cache.

Note that you rarely would want to change this. Caching at this level happens after a query has executed. Using a cache like APC or MemCache at this point would be really expensive, and would only be worth it for a large table.

Parameters

$key

Returns

null|object
public
# WriteToCache( )

Put the current object in the cache for future reference.

Put the current object in the cache for future reference.

public
# DeleteFromCache( )

Delete this particular object from the cache

Delete this particular object from the cache

public static
# ClearCache( )

Clears the caches associated with this table.

Clears the caches associated with this table.

API documentation generated by ApiGen