-
Backend
-
Behaviors
-
FormController
-
ImportExportController
-
ListController
-
RelationController
- FormController
- ImportExportController
- ListController
- RelationController
- ReorderController
- UserPreferencesModel
-
-
Classes
-
Dashboard
-
NavigationManager
-
WidgetManager
- AuthManager
- BackendController
- Controller
- ControllerBehavior
- DashboardManager
- DashboardWidgetBase
- FilterScope
- FilterWidgetBase
- FormField
- FormTabs
- FormWidgetBase
- ListColumn
- LoginCustomization
- MainMenuItem
- NavigationManager
- ReportDataSourceBase
- ReportDataSourceManager
- ReportWidgetBase
- RoleManager
- RolePermission
- SettingsController
- SideMenuItem
- Skin
- StaticReportWidgetContainer
- VueComponentBase
- WidgetBase
- WidgetManager
- WildcardController
-
-
Controllers
-
Database
-
Facades
-
FilterWidgets
-
FormWidgets
-
Helpers
-
Models
-
BrandSetting
-
ExportModel
-
ImportModel
- AccessLog
- BrandSetting
- Dashboard
- EditorSetting
- ExportModel
- ImportModel
- Preference
- ReportDataCache
- User
- UserGroup
- UserPreference
- UserPreferenceModel
- UserRole
- UserThrottle
-
-
ReportWidgets
-
Skins
-
Traits
-
VueComponents
-
Widgets
-
Filter
-
Form
-
Lists
-
Table
- Filter
- Form
- Lists
- ListStructure
- ReportContainer
- RoleImpersonator
- Search
- SiteSwitcher
- Table
- Toolbar
-
- ServiceProvider
-
-
Cms
-
Classes
-
Controller
-
EditorExtension
-
Layout
-
Page
-
Partial
-
Theme
- AjaxResponse
- Asset
- CmsCompoundObject
- CmsController
- CmsDemoTrafficDataGenerator
- CmsException
- CmsObject
- CmsObjectCache
- CmsObjectCollection
- CmsReportDataSource
- CmsStatusDataSource
- CodeBase
- CodeParser
- ComponentBase
- ComponentBehavior
- ComponentHelpers
- ComponentManager
- ComponentModuleBase
- ComponentPartial
- Content
- Controller
- EditorExtension
- Layout
- LayoutCode
- Meta
- Page
- PageCode
- PageManager
- Partial
- PartialCode
- PartialStack
- PartialWatcher
- Router
- Snippet
- SnippetManager
- Theme
- ThemeManager
- ThisVariable
- TrafficLogger
-
-
Components
-
Console
-
Controllers
-
Database
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- AjaxPartialTokenParser
- ComponentNode
- ComponentTokenParser
- ContentNode
- ContentTokenParser
- DebugExtension
- DefaultNode
- DefaultTokenParser
- Extension
- FlashNode
- FlashTokenParser
- FrameworkNode
- FrameworkTokenParser
- GetAttrAdjuster
- GetAttrNode
- Loader
- MetaNode
- MetaTokenParser
- PageNode
- PageTokenParser
- PartialNode
- PartialTokenParser
- PlaceholderNode
- PlaceholderTokenParser
- PutNode
- PutTokenParser
- ScriptsNode
- ScriptsTokenParser
- StylesNode
- StylesTokenParser
-
VueComponents
-
Widgets
- ServiceProvider
-
-
Editor
-
Behaviors
-
Classes
-
Controllers
-
Traits
-
VueComponents
- ServiceProvider
-
-
Media
-
Classes
-
Controllers
-
FormWidgets
-
Helpers
-
Twig
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
PresetManager
-
SiteManager
-
UiManager
-
UpdateManager
- AppBase
- CombineAssets
- DependencyResolver
- DriverBehavior
- ErrorHandler
- MailManager
- ManifestCache
- MarkupExtensionItem
- MarkupManager
- ModelBehavior
- PagerElement
- PluginBase
- PluginManager
- PresetManager
- ProductDetail
- RateLimiter
- ResizeImageItem
- ResizeImages
- SettingsManager
- SettingsMenuItem
- SiteManager
- SystemController
- SystemReportDataSource
- UiElement
- UiManager
- UpdateManager
- VersionManager
-
-
Console
- ComposerScript
- OctoberAbout
- OctoberDown
- OctoberFresh
- OctoberMigrate
- OctoberMirror
- OctoberOptimize
- OctoberPasswd
- OctoberUp
- OctoberUpdate
- OctoberUtil
- OctoberUtilCommands
- OctoberUtilPatches
- OctoberUtilRefitLang
- PluginCheck
- PluginDisable
- PluginEnable
- PluginInstall
- PluginList
- PluginRefresh
- PluginRemove
- PluginSeed
- PluginTest
- ProjectSync
-
Controllers
-
Database
-
Facades
-
Helpers
-
Middleware
-
Models
-
ReportWidgets
-
Traits
-
Twig
-
Widgets
- ServiceProvider
-
-
Tailor
-
Behaviors
-
Classes
-
Blueprint
-
BlueprintIndexer
-
EditorExtension
-
Relations
-
SchemaBuilder
-
Scopes
- Blueprint
- BlueprintCollection
- BlueprintErrorData
- BlueprintException
- BlueprintIndexer
- BlueprintModel
- BlueprintVerifier
- ComponentVariable
- ContentFieldBase
- EditorExtension
- FieldManager
- Fieldset
- NavigationItem
- PermissionItem
- RecordIndexer
- SchemaBuilder
- SchemaPruner
-
-
Components
-
Console
-
ContentFields
-
Controllers
-
Models
-
EntryRecord
-
GlobalRecord
-
RecordImport
- ContentSchema
- EntryRecord
- GlobalRecord
- NestedFormItem
- PreviewToken
- RecordExport
- RecordImport
- RepeaterItem
-
-
Traits
-
VueComponents
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
brand
-
files
-
filter
-
form
-
list
-
menu
-
page
-
roles
-
site
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
internalTrafficStatistics
-
object
-
page
-
pageLookup
-
resizer
-
router
-
sitePicker
-
template
-
theme
- extendTwig
-
-
deferredBinding
-
editor
-
extension
-
-
exception
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
auth
-
filter
-
form
-
relation
-
/docs/api/model/relation/add
-
/docs/api/model/relation/associate
- attach
-
/docs/api/model/relation/beforeadd
-
/docs/api/model/relation/beforeassociate
- beforeAttach
- beforeDetach
-
/docs/api/model/relation/beforedissociate
-
/docs/api/model/relation/beforeremove
- detach
-
/docs/api/model/relation/dissociate
-
/docs/api/model/relation/remove
-
-
/docs/api/model/afterboot
-
/docs/api/model/aftercreate
-
/docs/api/model/afterdelete
-
/docs/api/model/afterfetch
-
/docs/api/model/afterinit
- afterRelation
- afterRestore
-
/docs/api/model/aftersave
- afterTrash
-
/docs/api/model/afterupdate
- afterValidate
-
/docs/api/model/beforecreate
-
/docs/api/model/beforedelete
-
/docs/api/model/beforefetch
- beforeGetAttribute
- beforeRelation
- beforeReplicate
- beforeRestore
-
/docs/api/model/beforesave
- beforeSetAttribute
-
/docs/api/model/beforeupdate
- beforeValidate
- extendBlueprint
- getAttribute
- newInstance
- saveInternal
- setAttribute
-
-
pages
-
snippet
-
-
site
-
system
-
assets
- beforeAddAsset
-
/docs/api/system/assets/beforebundleasset
-
console
-
mirror
-
-
mail
-
reportwidgets
-
resizer
-
settings
-
site
-
updater
- extendConfigFile
- extendTwig
-
-
tailor
-
user
-
-
Library
-
Argon
-
Assetic
-
Asset
-
Cache
-
Exception
-
Factory
-
Filter
-
Traits
-
Util
- README
- AsseticServiceProvider
- AssetManager
- AssetWriter
- Combiner
- FilterManager
-
-
Auth
-
Combine
-
Composer
-
Config
-
Database
-
Attach
-
Concerns
-
Connections
-
Connectors
-
Factories
-
Models
-
Relations
-
Schema
-
Scopes
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- Dongle
- ExpandoModel
- MigrationServiceProvider
- Model
- ModelBehavior
- ModelException
- MorphPivot
- NestedTreeScope
- Pivot
- QueryBuilder
- Replicator
- SortableScope
- TreeCollection
- Updater
-
-
Element
-
Filter
-
Form
-
Lists
-
Navigation
- ElementBase
- ElementHolder
-
-
Events
-
Exception
-
Extension
-
Filesystem
-
Flash
-
Foundation
-
Bootstrap
-
Console
-
Exception
-
Http
-
Middleware
- Kernel
-
-
Providers
- Application
-
-
Halcyon
-
Concerns
-
Datasource
-
Exception
-
Processors
-
Traits
- README
- Builder
- Collection
- HalcyonServiceProvider
- Model
-
-
Html
-
Mail
-
Network
-
Parse
-
Resize
-
Router
-
Scaffold
-
Support
-
Debug
-
Facades
-
Traits
- README
- Arr
- ClassLoader
- Collection
- Facade
- ModuleServiceProvider
- SafeCollection
- ServiceProvider
- Singleton
- Str
-
-
Translation
-
Validation
-
- Documentation
- API
- Library
- Halcyon
- Builder
October\Rain\Halcyon\Builder
Overview
Builder for Halcyon queries
Public Properties
public array $columns
columns that should be returned
public array $extensions
extensions filter the query by these file extensions
public string $from
from the directory name which the query is targeting
public bool $selectSingle
selectSingle query should pluck a single record
public string $fileMatch
fileMatch using the specified pattern
public array $orders
orders is the orderings for the query
public int $limit
limit is the maximum number of records to return
public int $offset
offset is the number of records to skip
Protected Properties
protected October\Rain\Halcyon\Datasource\DatasourceInterface $datasource
datasource instance
protected October\Rain\Halcyon\Model $model
model being queried
protected October\Rain\Halcyon\Processors\Processor $processor
processor datasource query post processor instance
protected string $cacheKey
cacheKey that should be used when caching the query
protected int $cacheMinutes
cacheMinutes number of minutes to cache the query
protected array $cacheTags
cacheTags for the query cache
protected string $cacheDriver
cacheDriver to be used
protected bool $loadedFromCache
loadedFromCache is an internal variable to specify if the record was loaded from cache
Public Methods
public __call()
public __call(string $method, array $parameters): mixed
__call handles dynamic method calls into the method
public __construct()
public __construct($datasource, $processor): void
__construct creates a new query builder instance
public cacheDriver()
public cacheDriver(string $cacheDriver): $this
cacheDriver indicate that the results, if cached, should use the given cache driver
public cacheTags()
public cacheTags(array|mixed $cacheTags): $this
cacheTags indicates that the results, if cached, should use the given cache tags
public delete()
public delete(): int
delete a record from the database.
public find()
public find(string $fileName): mixed|static
find a single template by its file name.
public first()
public first(): mixed|static
first executes the query and get the first result
public from()
public from(string $dirName): $this
from sets the directory name which the query is targeting
public generateCacheKey()
public generateCacheKey(): string
generateCacheKey for the query
public get()
public get( array $columns = [ 0 => '*'] ): October\Rain\Halcyon\Collection|static[]
get executes the query as a "select" statement
public getCacheKey()
public getCacheKey(): string
getCacheKey gets a unique cache key for the complete query
public getCached()
public getCached(array $columns = [ 0 => '*']): array
getCached executes the query as a cached "select" statement
public getFresh()
public getFresh( array $columns = [ 0 => '*'] ): October\Rain\Halcyon\Collection|static[]
getFresh executes the query as a fresh "select" statement
public getModel()
public getModel(): October\Rain\Halcyon\Model
getModel instance being queried
public getModels()
public getModels(array $results): October\Rain\Halcyon\Model[]
getModels gets the hydrated models
public insert()
public insert($values): bool
insert a new record into the datasource.
public lastModified()
public lastModified(): int
lastModified returns the last modified time of the object
public limit()
public limit(int $value): $this
limit sets the "limit" value of the query
public lists()
public lists(string $column, string $key = null): array
lists is short-hand for pluck()->all()
public offset()
public offset(int $value): $this
offset sets the "offset" value of the query
public pluck()
public pluck(string $column, string $key = null): Collection
pluck gets an array with the values of a given column
public remember()
public remember(DateTime|int $minutes, string $key = null): $this
remember indicates that the query results should be cached
public rememberForever()
public rememberForever(string $key = null): $this
rememberForever indicates that the query results should be cached forever
public setModel()
public setModel($model): $this
setModel instance for the model being queried
public skip()
public skip(int $value): October\Rain\Halcyon\Builder|static
skip is an alias to set the "offset" value of the query
public take()
public take(int $value): October\Rain\Halcyon\Builder|static
take is an alias to set the "limit" value of the query
public toCompiled()
public toCompiled(): string
toCompiled gets the compiled file content representation of the query
public update()
public update($values): int
update a record in the datasource.
public whereFileName()
public whereFileName(string $fileName): $this
whereFileName switches mode to select a single template by its name
Protected Methods
protected getCache()
protected getCache(): Illuminate\Cache\CacheManager
getCache object with tags assigned, if applicable
protected getCacheCallback()
protected getCacheCallback(string $fileName): Closure
getCacheCallback used when caching queries
protected isCacheBusted()
protected isCacheBusted(array $result): bool
isCacheBusted returns true if the cache for the file is busted. This only applies to single record selection
protected processInitCacheData()
protected processInitCacheData(array $data): array
processInitCacheData initializes the cache data of each record
protected runSelect()
protected runSelect(): array
runSelect runs the query as a "select" statement against the datasource
protected validateDirectoryName()
protected validateDirectoryName(string $dirName = null): void
validateDirectoryName validates the supplied directory path
protected validateFileName()
protected validateFileName(string $fileName = null): void
validateFileName validates the supplied filename, extension and path
protected validateFileNameExtension()
protected validateFileNameExtension( string $fileName, array $allowedExtensions ): void
validateFileNameExtension validates whether a file has an allowed extension
protected validateFileNamePath()
protected validateFileNamePath( string $filePath, int $maxNesting = 5 ): void
validateFileNamePath validates a template path Template directory and file names can contain only alphanumeric symbols, dashes and dots.
protected validateFileNamePattern()
protected validateFileNamePattern(string $fileName): boolean
validateFileNamePattern validates a template file or directory name template file names can contain only alphanumeric symbols, dashes, underscores and dots.