Overview

Packages

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

Classes

  • AbstractControl_CodeGenerator
  • AjaxTimingForm
  • BasicForm
  • BasicOrmTests
  • BBCodeParser
  • CacheTests
  • CalculatorForm
  • CalculatorWidget
  • ComplexColumn
  • DataRepeaterExample
  • Event
  • ExampleCheckColumn1
  • ExampleCheckColumn2
  • ExampleForm
  • Examples
  • ExampleService
  • ExamplesForm
  • ExampleSingleForm
  • ExpandAsArrayTests
  • HtmlJqDoc
  • InjectForm
  • JavaScriptHelper
  • JqAttributes
  • JqControlGen
  • JqDoc
  • JqIcon
  • Method
  • ModelConnectorTests
  • MyControl
  • MyQSlider_ChangeEvent
  • NavPanel
  • NestedTabForm
  • Option
  • Order
  • PaginatorForm
  • ParamsForm
  • PersistentExampleForm
  • PersonEditPanel
  • PluginEditForm
  • PluginManagerForm
  • Project
  • ProjectEditPanel
  • ProjectListForm
  • ProjectPickerListBox
  • ProjectViewPanel
  • QAbstractCacheProvider
  • QAbstractHtmlTableColumn
  • QAbstractHtmlTableDataColumn
  • QAccordion
  • QAccordion_ActivateEvent
  • QAccordion_BeforeActivateEvent
  • QAccordion_CreateEvent
  • QAccordionBase
  • QAccordionGen
  • QAction
  • QActionControl
  • QAjaxAction
  • QAjaxControlAction
  • QAjaxResponse
  • QAlertAction
  • QApplication
  • QApplicationBase
  • QArchive
  • QAutocomplete
  • QAutocomplete_ChangeEvent
  • QAutocomplete_CloseEvent
  • QAutocomplete_CodeGenerator
  • QAutocomplete_CreateEvent
  • QAutocomplete_FocusEvent
  • QAutocomplete_OpenEvent
  • QAutocomplete_ResponseEvent
  • QAutocomplete_SearchEvent
  • QAutocomplete_SelectEvent
  • QAutocomplete_SourceEvent
  • QAutocompleteBase
  • QAutocompleteBase_CodeGenerator
  • QAutocompleteGen
  • QAutocompleteListItem
  • QBackspaceKeyEvent
  • QBaseClass
  • QBlockControl
  • QBlurControlAction
  • QBlurEvent
  • QBorderCollapse
  • QBorderStyle
  • QBrowserType
  • QButton
  • QButtonBase
  • QCache
  • QCacheDeleteAction
  • QCacheDeleteAllAction
  • QCacheProviderAPC
  • QCacheProviderLocalMemory
  • QCacheProviderLocalMemoryTest
  • QCacheProviderMemcache
  • QCacheProviderNoCache
  • QCacheProviderProxy
  • QCacheSetAction
  • QCalendar
  • QCalendarType
  • QCallType
  • QCausesValidation
  • QCellClickEvent
  • QChangeEvent
  • QCheckBox
  • QCheckBox_CodeGenerator
  • QCheckBoxBase_CodeGenerator
  • QCheckBoxLegacyColumn
  • QCheckBoxList
  • QCheckBoxList_CodeGenerator
  • QCheckBoxListBase_CodeGenerator
  • QClickEvent
  • QCodeGen
  • QCodeGenBase
  • QConfirmAction
  • QContextMenuEvent
  • QControl
  • QControl_CodeGenerator
  • QControlBase
  • QControlBase_CodeGenerator
  • QControlBaseTests
  • QControlCategoryType
  • QControlGrouping
  • QControlLabel
  • QControlProxy
  • QConvertNotation
  • QConvertNotationBase
  • QCrossScripting
  • QCryptography
  • QCss
  • QCssAction
  • QCssClassAction
  • QCssTests
  • QCsvTextBox
  • QCursor
  • QDatabaseBase
  • QDatabaseCodeGen
  • QDatabaseFieldBase
  • QDatabaseFieldType
  • QDatabaseForeignKey
  • QDatabaseIndex
  • QDatabaseResultBase
  • QDatabaseRowBase
  • QDatabaseTests
  • QDataGrid
  • QDataGrid_CheckBoxColumn
  • QDataGrid_CodeGenerator
  • QDataGrid_SortEvent
  • QDataGridBase
  • QDataGridBase_CodeGenerator
  • QDataGridLegacy
  • QDataGridLegacyBase
  • QDataGridLegacyColumn
  • QDataGridLegacyRow
  • QDataGridLegacyRowStyle
  • QDataRepeater
  • QDatepicker
  • QDatepicker_BeforeShowDayEvent
  • QDatepicker_BeforeShowEvent
  • QDatepicker_CalculateWeekEvent
  • QDatepicker_ChangeMonthYearEvent
  • QDatepicker_CloseEvent
  • QDatepicker_SelectEvent
  • QDatepicker_SelectEvent2
  • QDatepickerBase
  • QDatepickerBox
  • QDatepickerBox_BeforeShowDayEvent
  • QDatepickerBox_BeforeShowEvent
  • QDatepickerBox_CalculateWeekEvent
  • QDatepickerBox_ChangeMonthYearEvent
  • QDatepickerBox_CloseEvent
  • QDatepickerBox_CodeGenerator
  • QDatepickerBox_SelectEvent
  • QDatepickerBoxBase
  • QDatepickerBoxBase_CodeGenerator
  • QDatepickerBoxGen
  • QDatepickerGen
  • QDateTime
  • QDateTimePicker
  • QDateTimePicker_CodeGenerator
  • QDateTimePickerBase_CodeGenerator
  • QDateTimePickerFormat
  • QDateTimePickerType
  • QDateTimeSpan
  • QDateTimeTests
  • QDateTimeTextBox
  • QDbBackedFormStateHandler
  • QDbBackedSessionHandler
  • QDialog
  • QDialog_BeforeCloseEvent
  • QDialog_ButtonEvent
  • QDialog_CloseEvent
  • QDialog_CreateEvent
  • QDialog_DragEvent
  • QDialog_DragStartEvent
  • QDialog_DragStopEvent
  • QDialog_FocusEvent
  • QDialog_OpenEvent
  • QDialog_ResizeEvent
  • QDialog_ResizeStartEvent
  • QDialog_ResizeStopEvent
  • QDialogBase
  • QDialogBox
  • QDialogGen
  • QDisplayStyle
  • QDoubleClickEvent
  • QDownArrowKeyEvent
  • QDragDropEvent
  • QDraggable
  • QDraggable_CreateEvent
  • QDraggable_DragEvent
  • QDraggable_StartEvent
  • QDraggable_StopEvent
  • QDraggableBase
  • QDraggableGen
  • QDroppable
  • QDroppable_ActivateEvent
  • QDroppable_CreateEvent
  • QDroppable_DeactivateEvent
  • QDroppable_DropEvent
  • QDroppable_OutEvent
  • QDroppable_OverEvent
  • QDroppableBase
  • QDroppableGen
  • QDropZoneGrouping
  • QEmailAttachment
  • QEmailMessage
  • QEmailServer
  • QEmailStringAttachment
  • QEmailTextBox
  • QEnterKeyEvent
  • QErrorAttribute
  • QEscapeKeyEvent
  • QEvent
  • QFieldset
  • QFile
  • QFileAsset
  • QFileAssetBase
  • QFileAssetDialog
  • QFileAssetType
  • QFileControl
  • QFileFormStateHandler
  • QFilterType
  • QFloatTextBox
  • QFloatTextBox_CodeGenerator
  • QFloatTextBoxBase_CodeGenerator
  • QFocusControlAction
  • QFocusEvent
  • QFocusInEvent
  • QFocusOutEvent
  • QFolder
  • QFontFamily
  • QForm
  • QFormBase
  • QFormGen
  • QFormStateHandler
  • QGridLines
  • QHideCalendarAction
  • QHideDialog
  • QHideDialogBox
  • QHListControl
  • QHListItem
  • QHorizontalAlign
  • QHtml
  • QHtmlAttributeManager
  • QHtmlAttributeManagerBase
  • QHtmlReporter
  • QHtmlTable
  • QHtmlTable_CodeGenerator
  • QHtmlTableBase
  • QHtmlTableCallableColumn
  • QHtmlTableCheckBoxColumn
  • QHtmlTableCheckBoxColumn_ClickEvent
  • QHtmlTableIndexedColumn
  • QHtmlTableLinkColumn
  • QHtmlTableNodeColumn
  • QHtmlTablePropertyColumn
  • QI18n
  • QI18nTests
  • QImageBase
  • QImageBrowser
  • QImageBrowserBase
  • QImageBrowserNav
  • QImageBrowserThumbnails
  • QImageButton
  • QImageControl
  • QImageControlBase
  • QImageFileAsset
  • QImageLabel
  • QImageLabelBase
  • QImageRollover
  • QImageType
  • QIndex
  • QInformixPdoDatabase
  • QInformixPdoDatabaseField
  • QInformixPdoDatabaseResult
  • QInformixPdoDatabaseRow
  • QInputEvent
  • QInstallationValidationResult
  • QInstallationValidator
  • QIntegerTextBox
  • QIntegerTextBox_CodeGenerator
  • QIntegerTextBoxBase_CodeGenerator
  • QJavaScriptAction
  • QJQAction
  • QJQBounceAction
  • QJqButton
  • QJqButton_CreateEvent
  • QJqButtonBase
  • QJqButtonGen
  • QJqCheckBox
  • QJqCheckBox_CreateEvent
  • QJqCheckBoxBase
  • QJqCheckBoxGen
  • QJQHideAction
  • QJQHideEffectAction
  • QJQHighlightAction
  • QJQPulsateAction
  • QJqRadioButton
  • QJqRadioButton_CreateEvent
  • QJqRadioButtonBase
  • QJqRadioButtonGen
  • QJQShakeAction
  • QJQShowAction
  • QJQShowEffectAction
  • QJQSizeAction
  • QJQToggleAction
  • QJQToggleEffectAction
  • QJQTransferAction
  • QJqUiEvent
  • QJqUiPropertyEvent
  • QJsClosure
  • QJsFunction
  • QJsNoQuoteKey
  • QJsParameterList
  • QJsPriority
  • QJsTimer
  • QJsTimerBase
  • QJsVarName
  • QKeyDownEvent
  • QKeyPressEvent
  • QKeyUpEvent
  • QLabel
  • QLabel_CodeGenerator
  • QLabelBase_CodeGenerator
  • QLexer
  • QLinkButton
  • QListBox
  • QListBox_CodeGenerator
  • QListBoxBase
  • QListBoxBase_CodeGenerator
  • QListControl
  • QListControl_CodeGenerator
  • QListControlBase_CodeGenerator
  • QListItem
  • QListItemBase
  • QListItemStyle
  • QManyToManyReference
  • QMenu
  • QMenu_BlurEvent
  • QMenu_CreateEvent
  • QMenu_FocusEvent
  • QMenu_SelectEvent
  • QMenuBase
  • QMenuGen
  • QMimeType
  • QModelConnectorArgumentType
  • QModelConnectorCreateType
  • QModelConnectorEditDlg
  • QModelConnectorOptions
  • QModelConnectorParam
  • QMouseDownEvent
  • QMouseEnterEvent
  • QMouseLeaveEvent
  • QMouseMoveEvent
  • QMouseOutEvent
  • QMouseOverEvent
  • QMouseUpEvent
  • QMultiLevelCacheProvider
  • QMySqlDatabase
  • QMySqlDatabaseField
  • QMySqlDatabaseResult
  • QMySqli5ClusterDatabase
  • QMySqli5Database
  • QMySqli5DatabaseField
  • QMySqli5DatabaseResult
  • QMySqliDatabase
  • QMySqliDatabaseField
  • QMySqliDatabaseResult
  • QMySqliDatabaseRow
  • QNoScriptAjaxAction
  • QNumericTextBox
  • QOnEvent
  • QOracleDatabase
  • QOracleDatabaseField
  • QOracleDatabaseResult
  • QOracleDatabaseRow
  • QOrderedListType
  • QOverflow
  • QPaginatedControl
  • QPaginator
  • QPaginatorBase
  • QPanel
  • QPartialQueryBuilder
  • QPdoDatabase
  • QPdoDatabaseResult
  • QPgConditionILike
  • QPgConditionJsonContains
  • QPgQ
  • QPosition
  • QPostgreSqlDatabase
  • QPostgreSqlDatabaseField
  • QPostgreSqlDatabaseResult
  • QPostgreSqlDatabaseRow
  • QPostgreSqlPdoDatabase
  • QPostgreSqlPdoDatabaseField
  • QPostgreSqlPdoDatabaseResult
  • QPostgreSqlPdoDatabaseRow
  • QProgressbar
  • QProgressbar_ChangeEvent
  • QProgressbar_CompleteEvent
  • QProgressbar_CreateEvent
  • QProgressbarBase
  • QProgressbarGen
  • QQ
  • QQAggregationClause
  • QQAliasTests
  • 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
  • QQFuncTests
  • QQFunctionNode
  • QQGroupBy
  • QQHavingClause
  • QQLimitInfo
  • QQMathNode
  • QQMathOpTests
  • QQMaximum
  • QQMinimum
  • QQNamedValue
  • QQNode
  • QQNoParentNode
  • QQOrderBy
  • QQReverseReferenceNode
  • QQSelect
  • QQSubQueryCountNode
  • QQSubQueryNode
  • QQSubQuerySqlNode
  • QQSum
  • QQTableNode
  • QQuery
  • QQueryBuilder
  • QQueryExpansion
  • QQVirtualNode
  • QRadioButton
  • QRadioButtonList
  • QRadioButtonList_CodeGenerator
  • QRadioButtonListBase_CodeGenerator
  • QRedirectAction
  • QReference
  • QRegex
  • QRegisterClickPositionAction
  • QRepeatDirection
  • QRequestMode
  • QResetTimerAction
  • QResizable
  • QResizable_CreateEvent
  • QResizable_ResizeEvent
  • QResizable_StartEvent
  • QResizable_StopEvent
  • QResizableBase
  • QResizableGen
  • QResizeHandleDirection
  • QRestServiceCodeGen
  • QReverseReference
  • QRssCategory
  • QRssFeed
  • QRssImage
  • QRssItem
  • QSampleControl
  • QSampleTranslation
  • QSelectable
  • QSelectable_CreateEvent
  • QSelectable_SelectedEvent
  • QSelectable_SelectingEvent
  • QSelectable_StartEvent
  • QSelectable_StopEvent
  • QSelectable_UnselectedEvent
  • QSelectable_UnselectingEvent
  • QSelectableBase
  • QSelectableGen
  • QSelectControlAction
  • QSelectEvent
  • QSelectionMode
  • QSelectMenu
  • QSelectMenu_ChangeEvent
  • QSelectMenu_CloseEvent
  • QSelectMenu_CreateEvent
  • QSelectMenu_FocusEvent
  • QSelectMenu_OpenEvent
  • QSelectMenu_SelectEvent
  • QSelectMenuBase
  • QSelectMenuGen
  • QServerAction
  • QServerControlAction
  • QSessionFormStateHandler
  • QSetValueAction
  • QShowCalendarAction
  • QShowDialog
  • QShowDialogBox
  • QSlider
  • QSlider_ChangeEvent
  • QSlider_CodeGenerator
  • QSlider_CreateEvent
  • QSlider_SlideEvent
  • QSlider_StartEvent
  • QSlider_StopEvent
  • QSliderBase
  • QSliderBase_CodeGenerator
  • QSliderGen
  • QSoapMethod
  • QSoapParameter
  • QSoapService
  • QSortable
  • 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
  • QSortableBase
  • QSortableGen
  • QSpinner
  • QSpinner_ChangeEvent
  • QSpinner_CreateEvent
  • QSpinner_SpinEvent
  • QSpinner_StartEvent
  • QSpinner_StopEvent
  • QSpinnerBase
  • QSpinnerGen
  • QSqlColumn
  • QSqLite3PdoDatabase
  • QSqLite3PdoDatabaseField
  • QSqLite3PdoDatabaseResult
  • QSqLite3PdoDatabaseRow
  • QSqlServer2005Database
  • QSqlServer2005DatabaseField
  • QSqlServer2005DatabaseResult
  • QSqlServer2005DatabaseRow
  • QSqlServerDatabase
  • QSqlServerDatabaseField
  • QSqlServerDatabaseResult
  • QSqlServerDatabaseRow
  • QSqlTable
  • QStack
  • QStopPropagationAction
  • QString
  • QStringTest
  • QTabKeyEvent
  • QTabs
  • QTabs_ActivateEvent
  • QTabs_BeforeActivateEvent
  • QTabs_BeforeLoadEvent
  • QTabs_CreateEvent
  • QTabs_LoadEvent
  • QTabsBase
  • QTabsGen
  • QTag
  • QTagStyler
  • QTerminateAction
  • QTestControl
  • QTestForm
  • QTextAlign
  • QTextBox
  • QTextBox_CodeGenerator
  • QTextBoxBase
  • QTextBoxBase_CodeGenerator
  • QTextMode
  • QTimer
  • QTimerExpiredEvent
  • QTimerTests
  • QToggleCssClassAction
  • QToggleDisplayAction
  • QToggleEnableAction
  • QTranslationPoParser
  • QTreeNav
  • QTreeNavItem
  • QType
  • QTypeTable
  • QTypeTests
  • QUnitTestCaseBase
  • QUnorderedListStyle
  • QUpArrowKeyEvent
  • QUrlTextBox
  • QVerticalAlign
  • QVirtualAttributeColumn
  • QWaitIcon
  • QWatcher
  • QWatcherBase
  • QWatcherCache
  • QWatcherDB
  • QWatcherNone
  • QWriteBox
  • RecordsSummary
  • RefreshForm
  • SampleComposite
  • SampleForm
  • SelectableLabel
  • SelectForm
  • SpeedForm
  • TestImageBrowser
  • UrlForm

Interfaces

  • ICacheAction
  • QDataList_CodeGenerator_Interface
  • QTranslationBase

Traits

  • QDataBinder
  • QListItemManager
  • QModelTrait

Exceptions

  • QCallerException
  • QCrossScriptingException
  • QCryptographyException
  • QDatabaseExceptionBase
  • QDataBindException
  • QDateTimeNullException
  • QEmailException
  • QIndexOutOfRangeException
  • QInformixPdoDatabaseException
  • QInvalidCastException
  • QInvalidFormStateException
  • QMySqliDatabaseException
  • QOptimisticLockingException
  • QOracleDatabaseException
  • QPdoDatabaseException
  • QPoParserException
  • QPostgreSqlDatabaseException
  • QPostgreSqlPdoDatabaseException
  • QRemoteAdminDeniedException
  • QSqLite3PdoDatabaseException
  • QSqlServer2005DatabaseException
  • QSqlServerDatabaseException
  • QUndefinedMethodException
  • QUndefinedPrimaryKeyException
  • QUndefinedPropertyException

Functions

  • __database_check_error
  • __QForm_EvaluateTemplate_ObHandler
  • _b
  • _indent
  • _nl
  • _p
  • _r
  • _t
  • _tp
  • _tr
  • array_trim
  • beginsWith
  • CamelCaseFromDash
  • CastToInt
  • DataGridEvalHandleError
  • 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
  1: <?php
  2:     class Examples {
  3:         public static $Categories = array();
  4:         public static $AdditionalCode = array();
  5:         public static $PluginExamples = array();
  6:         public static $PluginAdditions = array();
  7: 
  8:         public static function Init() {
  9:             $intIndex = -1;
 10: 
 11:             $intIndex++;
 12:             Examples::$Categories[$intIndex] = array();
 13:             Examples::$Categories[$intIndex]['name'] = 'Basic CodeGen';
 14:             Examples::$Categories[$intIndex]['description'] = 'An introduction to the QCubed Code Generator';
 15:             self::AddCoreExampleFile($intIndex, '/code_generator/about.php (About Sections 1 - 3)');
 16:             self::AddCoreExampleFile($intIndex, '/code_generator/intro.php About the Database');
 17:             self::AddCoreExampleFile($intIndex, '/code_generator/objects.php * Object Relational Model');
 18:             self::AddCoreExampleFile($intIndex, '/code_generator/indexes.php * Loading Objects');
 19:             self::AddCoreExampleFile($intIndex, '/code_generator/save_delete.php * Saving and Deleting');
 20:             self::AddCoreExampleFile($intIndex, '/code_generator/relationships.php * Relationships (Foreign Keys)');
 21:             self::AddCoreExampleFile($intIndex, '/code_generator/reverse_relationships.php * Reverse Relationships (One-to-One and One-to-Many)');
 22:             self::AddCoreExampleFile($intIndex, '/code_generator/relationships_many.php * Many-to-Many Relationships');
 23:             self::AddCoreExampleFile($intIndex, '/code_generator/script_path.php Defining Relationships without Foreign Keys');
 24:             self::AddCoreExampleFile($intIndex, '/code_generator/primary_keys.php Explanation of QCubed Primary Key Requirement');
 25:             Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__ . '/code_generator/intro.php'] = array('mysql_innodb.sql','sql_server.sql');
 26:             Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__  . __EXAMPLES__ . '/code_generator/script_path.php'] = array('mysql_myisam.sql', 'relationships.txt');
 27: 
 28:             $intIndex++;
 29:             Examples::$Categories[$intIndex] = array();
 30:             Examples::$Categories[$intIndex]['name'] = 'More About the Object Relational Model';
 31:             Examples::$Categories[$intIndex]['description'] = 'Looking more in depth at the functionality of the generated ORM';
 32:             self::AddCoreExampleFile($intIndex, '/more_codegen/sort_limit.php * Sorting and Limiting Array Results');
 33:             self::AddCoreExampleFile($intIndex, '/more_codegen/late_bind.php * Late Binding of Related Objects');
 34:             self::AddCoreExampleFile($intIndex, '/more_codegen/early_bind.php * Early Binding of Related Objects');
 35:             self::AddCoreExampleFile($intIndex, '/more_codegen/virtual_attributes.php * Virtual Attributes');
 36:             self::AddCoreExampleFile($intIndex, '/more_codegen/type_tables.php * Type Tables');
 37:             self::AddCoreExampleFile($intIndex, '/more_codegen/custom.php * Customized Business Logic');
 38:             self::AddCoreExampleFile($intIndex, '/more_codegen/custom_load.php * Customized Load Methods');
 39:             self::AddCoreExampleFile($intIndex, '/more_codegen/optimistic_locking.php * Optimistic Locking');
 40: 
 41:             $intIndex++;
 42:             Examples::$Categories[$intIndex] = array();
 43:             Examples::$Categories[$intIndex]['name'] = 'Querying in QCubed';
 44:             Examples::$Categories[$intIndex]['description'] = 'Ad Hoc Queries, Custom Load Methods, and QCubed Query';
 45:             self::AddCoreExampleFile($intIndex, '/qcubed_query/qq.php * QCubed Query: Object Oriented Database Querying');
 46:             self::AddCoreExampleFile($intIndex, '/qcubed_query/qqnode.php * QCubed Query: The QQ Node Classes');
 47:             self::AddCoreExampleFile($intIndex, '/qcubed_query/qqcondition.php * QCubed Query: The QQ Condition Classes');
 48:             self::AddCoreExampleFile($intIndex, '/qcubed_query/qqclause.php * QCubed Query: The QQ Clause Classes');
 49:             self::AddCoreExampleFile($intIndex, '/qcubed_query/conditional_expand.php * QCubed Query: Conditional Joins');
 50:             self::AddCoreExampleFile($intIndex, '/qcubed_query/association.php * QCubed Query: Handling Association Tables');
 51:             self::AddCoreExampleFile($intIndex, '/qcubed_query/reverse.php * QCubed Query: Handling Reverse Relationships');
 52:             self::AddCoreExampleFile($intIndex, '/qcubed_query/expandasarray.php * ExpandAsArray: Multiple related tables in one swift query');
 53:             self::AddCoreExampleFile($intIndex, '/qcubed_query/alias.php * SQL Aliases for QQuery');
 54:             self::AddCoreExampleFile($intIndex, '/qcubed_query/qqselect.php * Picking database columns for QQuery');
 55:             self::AddCoreExampleFile($intIndex, '/qcubed_query/qqfuncnmath.php * SQL functions and math operations for QQuery');
 56:             self::AddCoreExampleFile($intIndex, '/qcubed_query/subsql.php * Custom SQL Subqueries for QQuery');
 57:             self::AddCoreExampleFile($intIndex, '/qcubed_query/intro.php * Performing Custom SQL Queries');
 58:             self::AddCoreExampleFile($intIndex, '/qcubed_query/qcache.php * Caching Query Results with QueryArrayCached');
 59: 
 60:             $intIndex++;
 61:             Examples::$Categories[$intIndex] = array();
 62:             Examples::$Categories[$intIndex]['name'] = 'Basic QForms';
 63:             Examples::$Categories[$intIndex]['description'] = 'An introduction to QForms and QControls';
 64:             self::AddCoreExampleFile($intIndex, '/basic_qform/about.php (About Sections 4 - 10)');
 65:             self::AddCoreExampleFile($intIndex, '/basic_qform/intro.php Hello World Example');
 66:             self::AddCoreExampleFile($intIndex, '/basic_qform/state.php QForms: Stateful, Event-Driven Objects');
 67:             self::AddCoreExampleFile($intIndex, '/basic_qform/process_flow.php Understanding Process Flow');
 68:             self::AddCoreExampleFile($intIndex, '/basic_qform/calculator.php Calculator Example');
 69:             self::AddCoreExampleFile($intIndex, '/basic_qform/calculator_2.php Calculator Example with Validation');
 70:             self::AddCoreExampleFile($intIndex, '/basic_qform/calculator_3.php Calculator Example with &quot;Design&quot;');
 71:             self::AddCoreExampleFile($intIndex, '/basic_qform/listbox.php * Introduction to QListControl');
 72:             self::AddCoreExampleFile($intIndex, '/basic_qform/hlist.php * Generating Html Lists');
 73:             self::AddCoreExampleFile($intIndex, '/basic_qform/textbox.php * Introduction to QTextBoxControls');
 74:             
 75:             $intIndex++;
 76:             Examples::$Categories[$intIndex] = array();
 77:             Examples::$Categories[$intIndex]['name'] = 'Basic AJAX in QForms';
 78:             Examples::$Categories[$intIndex]['description'] = 'A look at how to AJAX-enable your QForms';
 79:             self::AddCoreExampleFile($intIndex, '/basic_ajax/intro.php Hello World Example using AJAX');
 80:             self::AddCoreExampleFile($intIndex, '/basic_ajax/calculator_2.php Calculator Example using AJAX');
 81:             self::AddCoreExampleFile($intIndex, '/basic_ajax/wait_icon.php Adding a Wait Icon');
 82: 
 83:             $intIndex++;
 84:             Examples::$Categories[$intIndex] = array();
 85:             Examples::$Categories[$intIndex]['name'] = 'More About Events and Actions';
 86:             Examples::$Categories[$intIndex]['description'] = 'Looking more in depth at the capabilities of the QEvent and QAction libraries';
 87:             self::AddCoreExampleFile($intIndex, '/events_actions/editable_listbox.php Editable ListBox');
 88:             self::AddCoreExampleFile($intIndex, '/events_actions/editable_listbox_2.php Conditional Events');
 89:             self::AddCoreExampleFile($intIndex, '/events_actions/delayed.php Trigger-Delayed Events');
 90:             self::AddCoreExampleFile($intIndex, '/events_actions/javascript_alerts.php Javascript Actions, Alerts and Confirmations');
 91:             self::AddCoreExampleFile($intIndex, '/events_actions/other_actions.php Other Client-Side QActions');
 92:             self::AddCoreExampleFile($intIndex, '/events_actions/event_propagation.php Controlling Event Bubbling');
 93:             self::AddCoreExampleFile($intIndex, '/events_actions/event_delegation.php Event Delegation');
 94:             self::AddCoreExampleFile($intIndex, '/events_actions/low_priority_js.php JavaScript priorities');
 95:             self::AddCoreExampleFile($intIndex, '/events_actions/watcher.php Automatic Refreshing of Controls');
 96:             self::AddCoreExampleFile($intIndex, '/events_actions/control_proxy.php Using QControlProxies to have Non-QControls Trigger Events');
 97: 
 98:             $intIndex++;
 99:             Examples::$Categories[$intIndex] = array();
100:             Examples::$Categories[$intIndex]['name'] = 'Paginated Controls';
101:             Examples::$Categories[$intIndex]['description'] = 'The QHtmlTable, QDataGrid and QDataRepeater controls';
102:             self::AddCoreExampleFile($intIndex, '/datagrid/intro.php * QHtmlTable');
103:             self::AddCoreExampleFile($intIndex, '/datagrid/columns.php * QHtmlTable Columns');
104:             self::AddCoreExampleFile($intIndex, '/datagrid/column_values.php * QHtmlTable Formatting and Styling');
105:             self::AddCoreExampleFile($intIndex, '/datagrid/link_column.php * QHtmlTable Link Column');
106:             self::AddCoreExampleFile($intIndex, '/datagrid/links_images.php * Dynamically adding Controls to QHtmlTable');
107:             self::AddCoreExampleFile($intIndex, '/datagrid/sorting.php * The QDataGrid Class and Sorting');
108:             self::AddCoreExampleFile($intIndex, '/datagrid/pagination.php * QDataGrid Pagination');
109:             self::AddCoreExampleFile($intIndex, '/datagrid/rowactions.php * Detecting Row and Cell Clicks');
110: 
111:             self::AddCoreExampleFile($intIndex, '/datagrid/qcheckboxcolumn.php * The Easy Way to Add a Checkbox Column to a Datagrid');
112:             self::AddCoreExampleFile($intIndex, '/dynamic/inline_editing.php * Datagrid with Inline Editing');
113: 
114:             self::AddCoreExampleFile($intIndex, '/master_detail/project_list.php * Nested QDataGrid');
115:             Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__  . '/master_detail/project_list.php'] = array(
116:                 'records.summary.php',
117:                 'records.summary.tpl.php',
118:                 'styles.css');
119:             self::AddCoreExampleFile($intIndex, '/datarepeater/ajax.php * Simple QDataRepeater using AJAX-triggered Pagination');
120:             Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__  . '/datarepeater/ajax.php'] = array('dtr_persons.tpl.php');
121: 
122: 
123:             $intIndex++;
124:             Examples::$Categories[$intIndex] = array();
125:             Examples::$Categories[$intIndex]['name'] = 'Advanced Controls Manipulation';
126:             Examples::$Categories[$intIndex]['description'] = 'Dynamically creating controls, Implementing custom controls';
127:             self::AddCoreExampleFile($intIndex, '/dynamic/qpanel.php Introduction to QBlockControls');
128:             self::AddCoreExampleFile($intIndex, '/dynamic/qpanel_2.php Dynamically Changing a Control\'s Parent');
129:             self::AddCoreExampleFile($intIndex, '/other_controls/persist.php Persistent Controls: Performance for Reusable Components');
130:             self::AddCoreExampleFile($intIndex, '/other_controls/sample.php Creating Your Own Control');
131:             self::AddCoreExampleFile($intIndex, '/composite/intro.php Creating a Composite Control');
132:             self::AddCoreExampleFile($intIndex, '/multiple_qform/intro.php "Multiple QForms" Functionality via Custom QPanels');
133:             self::AddCoreReferencedFile('/dynamic/qpanel.php', 'pnl_panel.tpl.php');
134:             self::AddCoreReferencedFile('/other_controls/sample.php', '__CORE_CONTROL__QSampleControl.class.php');
135:             self::AddCoreReferencedFile('/composite/intro.php', 'SampleComposite.class.php');
136:             self::AddCoreReferencedFile('/multiple_qform/intro.php', array(
137:                 'ProjectViewPanel.class.php', 'ProjectViewPanel.tpl.php',
138:                 'ProjectEditPanel.class.php', 'ProjectEditPanel.tpl.php',
139:                 'PersonEditPanel.class.php', 'PersonEditPanel.tpl.php'));
140: 
141:             $intIndex++;
142:             Examples::$Categories[$intIndex] = array();
143:             Examples::$Categories[$intIndex]['name'] = 'Advanced AJAX';
144:             Examples::$Categories[$intIndex]['description'] = 'Advanced AJAX functionality like drag and drop, selection and cinematic effects';
145:             self::AddCoreExampleFile($intIndex, '/advanced_ajax/renamer.php Renameable Labels');
146:             self::AddCoreExampleFile($intIndex, '/advanced_ajax/renamer_2.php Porting Code to the Client Side');
147:             self::AddCoreExampleFile($intIndex, '/advanced_ajax/move.php Moveable Controls (a.k.a. Drag and Drop)');
148:             self::AddCoreExampleFile($intIndex, '/advanced_ajax/scrolling.php Automatic Scrolling');
149:             self::AddCoreExampleFile($intIndex, '/advanced_ajax/move_target.php Move Handle: Specifying Which Controls to Move');
150:             self::AddCoreExampleFile($intIndex, '/advanced_ajax/drop_zone.php Move Handle: Defining Drop Zones');
151:             self::AddCoreExampleFile($intIndex, '/advanced_ajax/resize_jquery.php Resizing Block Controls');
152:             self::AddCoreExampleFile($intIndex, '/advanced_ajax/dialog_box.php Modal "Dialog Boxes"');
153:             self::AddCoreExampleFile($intIndex, '/other_controls/jq_example.php * Server-side wrappers for all jQuery UI Controls');
154:             self::AddCoreExampleFile($intIndex, '/other_controls/js_return_param_example.php Post data back to the server from jQuery UI controls');
155:             self::AddCoreExampleFile($intIndex, '/advanced_ajax/jquery_effects.php JQuery Effects');
156:             
157:             Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__ . '/advanced_ajax/dialog_box.php'] = array('CalculatorWidget.class.php','CalculatorWidget.tpl.php');
158: 
159:             $intIndex++;
160:             Examples::$Categories[$intIndex] = array();
161:             Examples::$Categories[$intIndex]['name'] = 'Other Advanced Controls';
162:             Examples::$Categories[$intIndex]['description'] = 'A collection of examples for some of the more advanced/complex QControls';
163:             self::AddCoreExampleFile($intIndex, '/image_label/intro.php Introduction to QImageLabel');
164:             self::AddCoreExampleFile($intIndex, '/image_rollover/intro.php Image rollovers using QImageRollover');
165:             self::AddCoreExampleFile($intIndex, '/treenav/treenav.php Introduction to QTreeNav');
166:             self::AddCoreExampleFile($intIndex, '/other_controls/image.php Introduction to QImageControl');
167:             self::AddCoreExampleFile($intIndex, '/other_controls/datetime.php Date and DateTime-based QControls');
168:             self::AddCoreExampleFile($intIndex, '/other_controls/file_asset.php Combining Controls, Ex. 1: A Better Way to Upload Files');
169:             self::AddCoreExampleFile($intIndex, '/image_browser/test_image_browser.php Combining Controls, Ex. 2: Browsing Image Files');
170:             self::AddCoreExampleFile($intIndex, '/other_controls/image_file_asset.php Upload Control Just for Images');
171:             self::AddCoreExampleFile($intIndex, '/other_controls/timer_js.php JavaScript Timer');
172:             self::AddCoreReferencedFile('/image_browser/test_image_browser.php', array('image_browser.tpl.php', 'imagebrowser.css'));
173: 
174:             $intIndex++;
175:             Examples::$Categories[$intIndex] = array();
176:             Examples::$Categories[$intIndex]['name'] = 'Model Connectors, DataGrid Connectors, and the Drafts';
177:             Examples::$Categories[$intIndex]['description'] = 'Combining the Code Generator with the QForm Library';
178:             self::AddCoreExampleFile($intIndex, '/other/formgen.php QForm and CodeGen, a Winning Combination to RAD');
179:             self::AddCoreExampleFile($intIndex, '/other/model_connectors.php * Introduction to Model Connectors');
180:             self::AddCoreExampleFile($intIndex, '/other/datagrid_connectors.php * Introduction to DataGrid Connectors');
181:             self::AddCoreExampleFile($intIndex, '/other/form_drafts.php * Introduction to the Drafts');
182: 
183:             $intIndex++;
184:             Examples::$Categories[$intIndex] = array();
185:             Examples::$Categories[$intIndex]['name'] = 'Beyond HTML';
186:             Examples::$Categories[$intIndex]['description'] = 'Other libraries in QCubed, including support for Email and RSS';
187:             self::AddCoreExampleFile($intIndex, '/communication/email.php Introduction to QEmailServer');
188:             self::AddCoreExampleFile($intIndex, '/communication/rss.php * Introduction to QRssFeed');
189:             self::AddCoreExampleFile($intIndex, '/other/parsing.php Introduction to parsing with QLexer and QRegex');
190:             self::AddCoreExampleFile($intIndex, '/communication/crypto.php Introduction to QCryptography');
191:             self::AddCoreExampleFile($intIndex, '/communication/i18n.php Introduction to QI18n (Internationalization)');
192:             self::AddCoreExampleFile($intIndex, '/communication/advanced_intl.php Advanced Internationalization techniques');
193:             self::AddCoreExampleFile($intIndex, '/communication/soap.php * Introduction to QSoapService');
194:             self::AddCoreExampleFile($intIndex, '/other/timer.php * Measuring Performance using QTimer');
195:             self::AddCoreReferencedFile('/communication/rss.php', 'rss_feed.php');
196:             self::AddCoreReferencedFile('/communication/i18n.php', array('en.po', 'es.po'));
197:             self::AddCoreReferencedFile('/communication/soap.php', 'example_service.php');
198:             self::AddCoreReferencedFile('/other/parsing.php', 'bb_parser.php');
199:             self::AddCoreReferencedFile('/communication/advanced_intl.php', 'sample_translator.class.php');
200:             
201: 
202:             $intIndex++;
203:             Examples::$Categories[$intIndex] = array();
204:             Examples::$Categories[$intIndex]['name'] = 'Other Tidbits';
205:             Examples::$Categories[$intIndex]['description'] = 'Other random examples, samples and tutorials';
206:             self::AddCoreExampleFile($intIndex, '/basic_qform/xss.php * Security: Preventing Cross-Site Scripting');
207:             self::AddCoreExampleFile($intIndex, '/other/optimistic_locking.php * Optimistic Locking and QForms');
208:             self::AddCoreExampleFile($intIndex, '/other/attribute_overriding.php Attribute Overriding');
209:             self::AddCoreExampleFile($intIndex, '/other/alternate_template.php Specifying a Template Filepath');
210:             self::AddCoreExampleFile($intIndex, '/other/single.php Single File QForms');
211:             self::AddCoreExampleFile($intIndex, '/other/form_state.php Working with FormState Handlers');
212:             self::AddCoreExampleFile($intIndex, '/other/print.php PHP Print Command Shortcuts');
213:             self::AddCoreExampleFile($intIndex, '/other/includes_outside.php Includes outside of the __DOCROOT__ for Security and Shared Installs');
214:             self::AddCoreReferencedFile('/other/alternate_template.php', 'some_template_file.tpl.php');
215: 
216:             $intIndex++;
217:             Examples::$Categories[$intIndex] = array();
218:             Examples::$Categories[$intIndex]['name'] = 'Plugin System';
219:             Examples::$Categories[$intIndex]['description'] = 'Infrastructure that lets the community extend QCubed';
220:             self::AddCoreExampleFile($intIndex, '/plugins/about.php Plugin Ecosystem: Introduction');
221:             self::AddCoreExampleFile($intIndex, '/plugins/components.php Writing your own plugins, Part 1: components of a plugin');
222:             self::AddCoreExampleFile($intIndex, '/plugins/packaging.php Writing your own plugins, Part 2: packaging a plugin');
223:             //self::AddCoreExampleFile($intIndex, '/plugins/unattended.php Automatic Installation of Plugins');
224:             self::AddCoreReferencedFile('/plugins/components.php', '__CORE_FRAMEWORK__QPluginInterface.class.php');
225: 
226:             // Scan plugin folders for examples to include
227:             if (defined ('__PLUGINS__') &&
228:                 is_dir(__PLUGINS__)) {
229:                 $plugins = scandir(__PLUGINS__);
230: 
231:                 if (count($plugins) > 0) {
232:                     //$intIndex++;
233:                     //Examples::$Categories[$intIndex] = array();
234:                     //Examples::$Categories[$intIndex]['name'] = 'Examples for Plugins';
235:                     //Examples::$Categories[$intIndex]['description'] = 'Examples and Documentation for Community-Written Plugins';
236: 
237:                     foreach ($plugins as $dirName) {
238:                         if ($dirName != '.' && $dirName != '..' && file_exists(__PLUGINS__ . '/' . $dirName . '/composer.json')) {
239:                             // read composer file for examples file name
240:                             $composerDetails = json_decode(file_get_contents(__PLUGINS__ . '/' . $dirName . '/composer.json' ), true);
241:                             if (!empty($composerDetails['extra']['examples'])) { // embed example page name into composer file for convenience
242:                                 foreach ($composerDetails['extra']['examples'] as $strExample) {
243:                                     $strExamplePath = __PLUGINS__ . '/' . $dirName . '/examples/' . $strExample;
244:                                     if (file_exists ($strExamplePath)) {
245:                                         self::AddPluginExampleFile($dirName, $strExample);
246:                                         if (!empty($composerDetails['extra']['exampleExtras'][$strExample])) {
247:                                             self::AddPluginExtraFile($dirName, $strExample, $composerDetails['extra']['exampleExtras'][$strExample]);
248:                                         }
249:                                     }
250:                                 }
251:                             }
252:                         }
253:                     }
254:                 }
255:             }
256:         }
257: 
258:         public static function AddPluginExampleFile($strPluginName, $strExampleFileName) {
259:             Examples::$PluginExamples[$strPluginName][] = $strExampleFileName;
260:         }
261: 
262:         public static function AddPluginExtraFile($strPluginName, $strExampleFileName, $extras) {
263:             Examples::$PluginAdditions[$strPluginName][$strExampleFileName] = $extras;
264:         }
265: 
266:         private static function AddCoreExampleFile($intIndex, $strExampleFileName) {
267:             array_push(Examples::$Categories[$intIndex], __VIRTUAL_DIRECTORY__ . __EXAMPLES__ . $strExampleFileName);
268:         }
269:         
270:         private static function AddCoreReferencedFile($strExampleFileName, $mixReferencedFile) {
271:             if (!is_array($mixReferencedFile)) {
272:                 $mixReferencedFile = array($mixReferencedFile);
273:             }
274:             Examples::$AdditionalCode[__VIRTUAL_DIRECTORY__ . __EXAMPLES__ . $strExampleFileName] = $mixReferencedFile;
275:         }
276: 
277:         public static function GetCategoryId() {
278:             $numCategories = count(Examples::$Categories);
279:             $categories = Examples::$Categories;
280:             for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
281:                 $objExampleCategory = Examples::$Categories[$intCategoryIndex];
282:                 
283:                 for ($intExampleIndex = 0; $intExampleIndex < count($objExampleCategory); $intExampleIndex++) {
284:                     if (array_key_exists($intExampleIndex, $objExampleCategory)) {
285:                         $strExample = $objExampleCategory[$intExampleIndex];
286:                         $intPosition = strpos($strExample, ' ');
287:                         $strScriptPath = substr($strExample, 0, $intPosition);
288: 
289:                         if (substr_count($strScriptPath, QApplicationBase::$ScriptName) > 0) {
290:                             return $intCategoryIndex;
291:                         }
292:                     }
293:                 }
294:             }
295: 
296:             // Might be a plugin
297:             $strScript = QApplicationBase::$ScriptName;
298:             if ($offset = strpos (QApplicationBase::$ScriptFilename, '/plugin/')) {
299:                 return 'plugin';
300:             }
301: 
302:             return null;
303:         }
304: 
305:         public static function GetExampleId() {
306:             for ($intCategoryIndex = 0; $intCategoryIndex < count(Examples::$Categories); $intCategoryIndex++) {
307:                 $objExampleCategory = Examples::$Categories[$intCategoryIndex];
308:                 
309:                 for ($intExampleIndex = 0; $intExampleIndex < count($objExampleCategory); $intExampleIndex++) {
310:                     if (array_key_exists($intExampleIndex, $objExampleCategory)) {
311:                         $strExample = $objExampleCategory[$intExampleIndex];
312:                         $intPosition = strpos($strExample, ' ');
313:                         $strScriptPath = strtolower(substr($strExample, 0, $intPosition));
314:                         $strName = substr($strExample, $intPosition + 1);
315:                         
316:                         $scriptName = QApplicationBase::$ScriptName;
317:                         $portionOfScriptName = strtolower(substr($scriptName, strlen(QApplicationBase::$ScriptName) - strlen($strScriptPath)));
318: 
319:                         if ($portionOfScriptName == $strScriptPath) {
320:                             return $intExampleIndex;                    
321:                         }
322:                     }
323:                 }
324:             }
325: 
326:             // Might be a plugin
327:             if ($offset = strpos (QApplicationBase::$ScriptFilename, '/plugin/')) {
328:                 $offset += strlen ('/plugin/');
329:                 $endoffset = strpos (QApplicationBase::$ScriptFilename, '/', $offset);
330:                 $strCat = substr (QApplicationBase::$ScriptFilename, $offset, $endoffset - $offset);
331: 
332:                 // Make sure it exists
333:                 if (!empty(Examples::$PluginExamples[$strCat])) {
334:                     return $strCat;
335:                 }
336:             }
337: 
338:             return null;
339:         }
340: 
341:         public static function GetPluginFile() {
342:             if ($offset = strpos (QApplicationBase::$ScriptFilename, '/plugin/')) {
343:                 $offset += strlen ('/plugin/');
344:                 $endoffset = strpos (QApplicationBase::$ScriptFilename, '/', $offset);
345:                 $strCat = substr (QApplicationBase::$ScriptFilename, $offset, $endoffset - $offset);
346: 
347:                 // make sure it exists (prevents cross-script attack)
348:                 if (!empty(Examples::$PluginExamples[$strCat])) {
349:                     $endoffset = strrpos (QApplicationBase::$ScriptFilename, '/', $offset);
350:                     $strCurFile = substr(QApplicationBase::$ScriptFilename, $endoffset + 1);
351:                     for ($intExampleIndex = 0; $intExampleIndex < count(Examples::$PluginExamples[$strCat]); $intExampleIndex++) {
352:                         if (Examples::$PluginExamples[$strCat][$intExampleIndex] == $strCurFile) {
353:                             return $strCurFile;
354:                         }
355:                     }
356:                 }
357:             }
358:             return null;
359:         }
360: 
361:         public static function GetExampleName($mixCategoryId, $mixExampleId) {
362:             if ($mixCategoryId == 'plugin') {
363:                 $strExample = Examples::$PluginExamples[$mixExampleId][0];
364:                 return $strExample;
365:             }
366:             $strExample = Examples::$Categories[$mixCategoryId][$mixExampleId];
367:             $intPosition = strpos($strExample, ' ');
368:             $strScriptPath = substr($strExample, 0, $intPosition);
369:             $strName = substr($strExample, $intPosition + 1);
370:             return $strName;
371:         }
372:         
373:         public static function GetExampleScriptPath($mixCategoryId, $mixExampleId, $mixSubId = null) {
374:             if ($mixCategoryId == 'plugin') {
375:                 $strScriptPath =  __PLUGIN_ASSETS__ . "/{$mixExampleId}/examples/{$mixSubId}";
376:                 return $strScriptPath;
377:             }
378:             $strExample = Examples::$Categories[$mixCategoryId][$mixExampleId];
379:             $intPosition = strpos($strExample, ' ');
380:             $strScriptPath = substr($strExample, 0, $intPosition);
381:             return $strScriptPath;
382:         }
383: 
384:         public static function PageName($strReference = null) {
385:             if (is_null($strReference))
386:                 $strReference = QApplication::$ScriptName;
387: 
388:             foreach (Examples::$Categories as $objExampleCategory)
389:                 foreach ($objExampleCategory as $strKey => $strExample)
390:                     if (is_numeric($strKey)) {
391:                         // Pull out the URL fragment from the example tree
392:                         $intPosition = strpos($strExample, ' ');
393:                         $strScriptName = substr($strExample, 0, $intPosition);
394: 
395:                         if (strpos($strReference, $strScriptName) !== false)
396:                             return(substr($strExample, $intPosition + 1));
397:                     }
398: 
399:             return 'Main Page';
400:         }
401:         
402:         public static function PageLinkName($strReference = null) {
403:             if (is_null($strReference))
404:                 $strReference = QApplication::$ScriptName;
405: 
406:             foreach (Examples::$Categories as $objExampleCategory)
407:                 foreach ($objExampleCategory as $strKey => $strExample)
408:                     if (is_numeric($strKey)) {
409:                         // Pull out the URL fragment from the example tree
410:                         $intPosition = strpos($strExample, ' ');
411:                         $strScriptName = substr($strExample, 0, $intPosition);
412: 
413:                         if (strpos($strReference, $strScriptName) !== false)
414:                             return($strScriptName);
415:                     }
416:         }
417:         
418:         public static function CodeLinks($strCategoryId, $strExampleId, $strSubId, $strCurrentScript) {
419:             $blnIsScript = false;
420: 
421:             $strReference = Examples::GetExampleScriptPath($strCategoryId, $strExampleId, $strSubId);
422: 
423:             if ($strCurrentScript == 'header.inc.php') {
424:                 $strToReturn = '<span class="headerGray">header.inc.php</span>';
425:                 $blnIsScript = true;
426:             } else {
427:                 $strToReturn = sprintf('<a href="%s/../header.inc.php" class="headerLink">header.inc.php</a>', QApplication::$RequestUri);
428:             }
429: 
430:             $strToReturn .= ' &nbsp; | &nbsp; ';
431: 
432:             if ($strCurrentScript == 'footer.inc.php') {
433:                 $strToReturn .= '<span class="headerGray">footer.inc.php</span>';
434:                 $blnIsScript = true;
435:             } else {
436:                 $strToReturn .= sprintf('<a href="%s/../footer.inc.php" class="headerLink">footer.inc.php</a>', QApplication::$RequestUri);
437:             }
438:             
439:             $strToReturn .= ' &nbsp; | &nbsp; ';
440:             if ($strCurrentScript == 'examples.css') {
441:                 $strToReturn .= '<span class="headerGray">examples.css</span>';
442:                 $blnIsScript = true;
443:             } else
444:                 $strToReturn .= sprintf('<a href="%s/../examples.css" class="headerLink">examples.css</a>', QApplication::$RequestUri);
445: 
446:             $strToReturn .= ' &nbsp; | &nbsp; ';
447: 
448:             $strScriptname = substr($strReference, strrpos($strReference, '/') + 1);
449:             if ($strCurrentScript == $strScriptname) {
450:                 $strToReturn .= sprintf('<span class="headerGray">%s</span>', $strScriptname);
451:                 $blnIsScript = true;
452:             } else
453:                 $strToReturn .= sprintf('<a href="%s/../%s" class="headerLink">%s</a>', QApplication::$RequestUri, $strScriptname, $strScriptname);
454: 
455: 
456:             // Current Number of Code Links
457:             $intCount = 4;
458: 
459:             if (file_exists(__DOCROOT__ . str_replace('.php', '.tpl.php', $strReference))) {
460:                 $strToReturn .= ' &nbsp; | &nbsp; ';
461: 
462:                 $strScriptname = substr(str_replace('.php', '.tpl.php', $strReference), strrpos(str_replace('.php', '.tpl.php', $strReference), '/') + 1);
463:                 if ($strCurrentScript == $strScriptname) {
464:                     $strToReturn .= sprintf('<span class="headerGray">%s</span>', $strScriptname);
465:                     $blnIsScript = true;
466:                 } else {
467:                     $strToReturn .= sprintf('<a href="%s/../%s" class="headerLink">%s</a>', QApplication::$RequestUri, $strScriptname, $strScriptname);
468:                 }
469:                 
470:                 $intCount++;
471:             }
472: 
473:             if ($strCategoryId == 'plugin') {
474:                 if (!empty(Examples::$PluginAdditions[$strExampleId][$strSubId])) {
475:                     $extraFiles = Examples::$PluginAdditions[$strExampleId][$strSubId];
476:                 }
477:             }
478:             if(array_key_exists($strReference, Examples::$AdditionalCode)) {
479:                 $extraFiles = Examples::$AdditionalCode[$strReference];
480:             }
481: 
482:             if (!empty($extraFiles)) {
483:                 foreach ($extraFiles as $strCode) {
484:                     if (($intCount % 7) == 0)
485:                         $strToReturn .= '<br/>';
486:                     else
487:                         $strToReturn .= ' &nbsp; | &nbsp; ';
488: 
489:                     $strScriptname = $strCode;
490:                     if ($strCurrentScript == $strScriptname) {
491:                         $strToReturn .= sprintf('<span class="headerGray">%s</span>', preg_replace('/__.*__/', '', $strScriptname));
492:                         $blnIsScript = true;
493:                     } else {
494:                         $strToReturn .= sprintf('<a href="%s/../%s" class="headerLink">%s</a>', QApplication::$RequestUri, $strScriptname, preg_replace('/__.*__/', '', $strScriptname));
495:                     }
496: 
497:                     $intCount++;
498:                 }
499:             }
500:                 
501:             if ($blnIsScript) {
502:                 return $strToReturn;
503:             }
504:             else {
505:                 QApplication::CloseWindow();
506:             }
507:         }
508: 
509:         public static function PageLinks() {
510:             $strPrevious = null;
511:             $strNext = null;
512:             $blnFound = false;
513: 
514:             $strScript = QApplication::$ScriptName;
515: 
516:             if (strpos($strScript, "plugin") !== false &&
517:                 strpos($strScript, "vendor") !== false) {
518:                 // a plugin
519:                 $strLink = QHtml::RenderLink(QHtml::MakeUrl(__DEVTOOLS_ASSETS__ . '/plugin_manager.php'), "Plugin Manager", ["class"=>"headerLink"]);
520:                 return $strLink;
521:             }
522: 
523:             foreach (Examples::$Categories as $objExampleCategory) {
524:                 if (!$blnFound) {
525:                     $strPrevious = null;
526:                     $strNext = null;
527: 
528:                     foreach ($objExampleCategory as $strKey => $strExample) {
529:                         if (is_numeric($strKey)) {
530:                             // Pull out the URL fragment from the example tree
531:                             $intPosition = strpos($strExample, ' ');
532:                             $strScriptName = substr($strExample, 0, $intPosition);
533:                             $strDescription = substr($strExample, $intPosition + 1);
534:                             $qapp = QApplication::$ScriptName;
535: 
536:                             if (!$blnFound) {
537:                                 if (strpos(QApplication::$ScriptName, $strScriptName) !== false || // for core examples
538:                                     strpos($strScriptName, QApplication::$ScriptName) !== false) { // for plugins examples
539:                                     $blnFound = true;
540:                                 } else {
541:                                     $strPrevious = sprintf('<strong><a href="%s" class="headerLink">&lt;&lt; %s</a></strong>',
542:                                         $strScriptName, $strDescription);
543:                                 }
544:                             } else if (!$strNext) {
545:                                 $strNext = sprintf('<strong><a href="%s" class="headerLink">%s &gt;&gt;</a></strong>',
546:                                     $strScriptName, $strDescription);
547:                             }
548:                         }
549:                     }
550:                 }
551:             }
552:             
553:             $strToReturn = '';
554:             
555:             if ($strPrevious)
556:                 $strToReturn = $strPrevious;
557:             else
558:                 $strToReturn = '<span class="headerGray">&lt;&lt; Previous</span>';
559: 
560:             $intCategoryId = Examples::GetCategoryId();
561:             if ($intCategoryId < 3)
562:                 $intPartId = 1;
563:             else if ($intCategoryId < 10)
564:                 $intPartId = 2;
565:             else
566:                 $intPartId = 3;
567: 
568:             $strToReturn .= ' &nbsp; | &nbsp; ';
569:             $strToReturn .= sprintf('<strong><a href="%s/index.php%s" class="headerLink">Back to Main</a></strong>',
570:                 __VIRTUAL_DIRECTORY__ . __EXAMPLES__, $intPartId == 1 ? "" : "/" . $intPartId);
571:             $strToReturn .= ' &nbsp; | &nbsp; ';
572: 
573:             if ($strNext)
574:                 $strToReturn .= $strNext;
575:             else
576:                 $strToReturn .= '<span class="headerGray">Next &gt;&gt;</span>';
577: 
578:             return $strToReturn;                
579:         }
580:     }
581:     
582:     //require_once(__PLUGINS__ . "/plugin_examples.php");
583: 
584:     Examples::Init();
585: ?>
586: 
API documentation generated by ApiGen