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

Class QMimeType

Class QMimeType: Helps determine MIME type of a file residing on the server

Abstract
Located at includes/framework/QMimeType.class.php
Methods summary
public static string
# GetMimeTypeForFile( string $strFilePath )

Returns the suggested MIME type for an actual file. Using file-based heuristics (data points in the ACTUAL file), it will utilize either the PECL FileInfo extension OR the Magic MIME extension (if either are available) to determine the MIME type. If all else fails, it will fall back to the basic GetMimeTypeForFilename() method.

Returns the suggested MIME type for an actual file. Using file-based heuristics (data points in the ACTUAL file), it will utilize either the PECL FileInfo extension OR the Magic MIME extension (if either are available) to determine the MIME type. If all else fails, it will fall back to the basic GetMimeTypeForFilename() method.

Parameters

$strFilePath
the absolute file path of the ACTUAL file

Returns

string

Throws

QCallerException
public static string
# GetMimeTypeForFilename( string $strFilename )

Returns the suggested MIME type for a filename by stripping out the extension and looking it up from QMimeType::$MimeTypeFor

Returns the suggested MIME type for a filename by stripping out the extension and looking it up from QMimeType::$MimeTypeFor

Parameters

$strFilename

Returns

string
public static string
# GetTokenForMimeType( string $strMimeType )

To more easily process a file repository based on Mime Types, it's sometimes easier to tokenize a mimetype and process using the tokens (e.g. if you have a directory of image icons that you want to map back to a mime type or a collection of mime types, a tokenized-version of the mime type would be more appropriate).

To more easily process a file repository based on Mime Types, it's sometimes easier to tokenize a mimetype and process using the tokens (e.g. if you have a directory of image icons that you want to map back to a mime type or a collection of mime types, a tokenized-version of the mime type would be more appropriate).

Given a string-based mime type, this will return a "tokenized" version of the mime type, which only consists of lower case characters and underscores (_).

Parameters

$strMimeType

Returns

string
Constants summary
string _Default

Binary Data / Default

Binary Data / Default

# 'application/octet-stream'
string Executable

Binary data

Binary data

# 'application/octet-stream'
string Gif

GIF image

GIF image

# 'image/gif'
string Gzip

GZip archive

GZip archive

# 'application/x-gzip'
string Html

HTML file

HTML file

# 'text/html'
string Jpeg

Image in JPEG/JPG format

Image in JPEG/JPG format

# 'image/jpeg'
string Mp3

MP3 audio

MP3 audio

# 'audio/mpeg'
string MpegVideo

MPEG Video

MPEG Video

# 'video/mpeg'
string MsExcel

Microsoft Office Excel file

Microsoft Office Excel file

# 'application/vnd.ms-excel'
string MsPowerpoint

Microsoft Office Powerpoint file

Microsoft Office Powerpoint file

# 'application/vnd.ms-powerpoint'
string MsWord

Microsoft Office Word file

Microsoft Office Word file

# 'application/vnd.ms-word'
string OoXmlWordProcessing

OpenOfficeXml word processing file (e.g. LibreOffice writer file)

OpenOfficeXml word processing file (e.g. LibreOffice writer file)

# 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
string OoXmlPresentation

OpenOfficeXml presentation file (e.g. LibreOffice impress file)

OpenOfficeXml presentation file (e.g. LibreOffice impress file)

# 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
string OoXmlSpreadsheet

OpenOfficeXml spreadsheet file (e.g. LibreOffice calc file)

OpenOfficeXml spreadsheet file (e.g. LibreOffice calc file)

# 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
string Pdf

PDF format document

PDF format document

# 'application/pdf'
string PlainText

Plain text file

Plain text file

# 'text/plain'
string Png

PNG format image

PNG format image

# 'image/png'
string RichText

RTF document

RTF document

# 'text/rtf'
string Quicktime

QuickTime video

QuickTime video

# 'video/quicktime'
string WavAudio

Audio in WAV format

Audio in WAV format

# 'audio/x-wav'
string Xml

XML file

XML file

# 'text/xml'
string Zip

Zip archive

Zip archive

# 'application/x-zip'
Properties summary
public static string[] $MimeTypeFor

MimeTypeFor array is used in conjunction with GetMimeTypeForFilename()

MimeTypeFor array is used in conjunction with GetMimeTypeForFilename()

# array( 'doc' => QMimeType::MsWord, 'docx' => QMimeType::OoXmlWordProcessing, 'exe' => QMimeType::Executable, 'gif' => QMimeType::Gif, 'gz' => QMimeType::Gzip, 'htm' => QMimeType::Html, 'html' => QMimeType::Html, 'jpeg' => QMimeType::Jpeg, 'jpg' => QMimeType::Jpeg, 'mov' => QMimeType::Quicktime, 'mp3' => QMimeType::Mp3, 'mpeg' => QMimeType::MpegVideo, 'mpg' => QMimeType::MpegVideo, 'pdf' => QMimeType::Pdf, 'php' => QMimeType::PlainText, 'png' => QMimeType::Png, 'ppt' => QMimeType::MsPowerpoint, 'pptx' => QMimeType::OoXmlPresentation, 'rtf' => QMimeType::RichText, 'sql' => QMimeType::PlainText, 'txt' => QMimeType::PlainText, 'wav' => QMimeType::WavAudio, 'xls' => QMimeType::MsExcel, 'xlsx' => QMimeType::OoXmlSpreadsheet, 'xml' => QMimeType::Xml, 'zip' => QMimeType::Zip )
public static string $MagicDatabaseFilePath

the absolute file path of the MIME Magic Database file

the absolute file path of the MIME Magic Database file

# null
API documentation generated by ApiGen