-
Backend
-
Behaviors
-
Classes
-
Controllers
-
Database
-
Seeds
-
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Skins
-
Traits
-
VueComponents
-
Widgets
- ServiceProvider
-
-
Cms
-
Classes
- Asset
- CmsCompoundObject
- CmsController
- CmsException
- CmsObject
- CmsObjectCollection
- CodeBase
- CodeParser
- ComponentBase
- ComponentHelpers
- ComponentManager
- ComponentPartial
- Content
- Controller
- EditorExtension
- Layout
- LayoutCode
- MediaLibrary
- MediaLibraryItem
- MediaViewHelper
- Meta
- ObjectMemoryCache
- Page
- PageCode
- Partial
- PartialCode
- PartialStack
- Router
- Theme
- ThemeManager
-
Components
-
Controllers
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ComponentNode
- ComponentTokenParser
- ContentNode
- ContentTokenParser
- DebugExtension
- DefaultNode
- DefaultTokenParser
- Extension
- FlashNode
- FlashTokenParser
- FrameworkNode
- FrameworkTokenParser
- Loader
- PageNode
- PageTokenParser
- PartialNode
- PartialTokenParser
- PlaceholderNode
- PlaceholderTokenParser
- PutNode
- PutTokenParser
- ScriptsNode
- ScriptsTokenParser
- StylesNode
- StylesTokenParser
-
VueComponents
-
Widgets
- ServiceProvider
-
-
Editor
-
Behaviors
-
Classes
-
Controllers
-
VueComponents
- ServiceProvider
-
-
Media
-
Classes
-
Controllers
-
FormWidgets
-
Twig
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
Console
-
OctoberUtil
- ComposerScript
- OctoberDown
- OctoberFresh
- OctoberMigrate
- OctoberMirror
- OctoberPasswd
- OctoberUp
- OctoberUpdate
- OctoberUtil
- PluginCheck
- PluginDisable
- PluginEnable
- PluginInstall
- PluginList
- PluginRefresh
- PluginRemove
- ProjectSet
- ProjectSync
- ThemeCheck
- ThemeInstall
- ThemeList
- ThemeRemove
- ThemeSync
- ThemeUse
-
-
Controllers
-
Database
-
Facades
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
-
Widgets
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
filter
-
form
-
list
-
menu
-
page
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
object
-
page
-
resizer
-
router
-
template
-
theme
-
-
exception
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
auth
-
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
-
- afterBoot
- afterCreate
- afterDelete
- afterFetch
- afterRestore
- afterSave
- afterUpdate
- afterValidate
- beforeCreate
- beforeDelete
- beforeFetch
- beforeGetAttribute
- beforeRestore
- beforeSave
- beforeSetAttribute
- beforeUpdate
- beforeValidate
- getAttribute
- saveInternal
- setAttribute
-
-
system
-
assets
-
console
-
mirror
-
theme
-
-
reportwidgets
-
resizer
-
settings
- extendConfigFile
-
-
translator
-
-
Library
-
Argon
-
Assetic
-
Asset
-
Cache
-
Exception
-
Factory
-
Filter
- BaseCssFilter
- CallablesFilter
- CssCacheBustingFilter
- CssImportFilter
- CssMinFilter
- CssRewriteFilter
- FilterCollection
- JavascriptImporter
- JSMinFilter
- JSMinPlusFilter
- JSqueezeFilter
- LessCompiler
- LessphpFilter
- MinifyCssCompressorFilter
- PackagerFilter
- PackerFilter
- ScssCompiler
- ScssphpFilter
- StylesheetMinify
-
Util
- README
- AssetManager
- AssetWriter
- FilterManager
-
-
Auth
-
Models
- AuthException
- Manager
-
-
Config
-
Database
-
Attach
-
Behaviors
-
Concerns
-
Connections
-
Connectors
-
Models
-
Relations
-
Schema
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- DataFeed
- Dongle
- MemoryCache
- MigrationServiceProvider
- Model
- ModelBehavior
- ModelException
- MorphPivot
- NestedTreeScope
- Pivot
- QueryBuilder
- SortableScope
- TreeCollection
- Updater
-
-
Events
-
Exception
-
Extension
-
Filesystem
-
Flash
-
Foundation
-
Bootstrap
-
Console
-
Exception
-
Http
-
Middleware
- Kernel
-
-
Providers
- Application
- Maker
-
-
Halcyon
-
Datasource
-
Exception
-
Processors
-
Traits
- README
- Builder
- Collection
- HalcyonServiceProvider
- MemoryCacheManager
- MemoryRepository
- Model
-
-
Html
-
Mail
-
Network
-
Parse
-
Parsedown
-
Syntax
- Bracket
- Ini
- Markdown
- MarkdownData
- ParseServiceProvider
- Twig
- Yaml
-
-
Process
-
Resize
-
Router
-
Scaffold
-
Support
-
Translation
-
- Documentation
- API
- Library
- Halcyon
- Builder
October\Rain\Halcyon\Builder
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 mixed __call(string $method, array $parameters)
__call handles dynamic method calls into the method
Parameters
- string $method
- array $parameters
public void __construct($datasource, $processor)
__construct creates a new query builder instance
Parameters
- $datasource
- $processor
public $this cacheDriver(string $cacheDriver)
cacheDriver indicate that the results, if cached, should use the given cache driver
Parameters
- string $cacheDriver
public $this cacheTags(array|mixed $cacheTags)
cacheTags indicates that the results, if cached, should use the given cache tags
Parameters
- array|mixed $cacheTags
public static void clearInternalCache()
clearInternalCache request-level object cache
public int delete()
delete a record from the database.
public mixed|static find(string $fileName)
find a single template by its file name.
Parameters
- string $fileName
public mixed|static first()
first executes the query and get the first result
public $this from(string $dirName)
from sets the directory name which the query is targeting
Parameters
- string $dirName
public string generateCacheKey()
generateCacheKey for the query
public October\Rain\Halcyon\Collection|static[] get(array $columns=array( 0=>'*'))
get executes the query as a "select" statement
Parameters
- array $columns
public string getCacheKey()
getCacheKey gets a unique cache key for the complete query
public array getCached(array $columns=array( 0=>'*'))
getCached executes the query as a cached "select" statement
Parameters
- array $columns
public October\Rain\Halcyon\Collection|static[] getFresh(array $columns=array( 0=>'*'))
getFresh executes the query as a fresh "select" statement
Parameters
- array $columns
public October\Rain\Halcyon\Model getModel()
getModel instance being queried
public October\Rain\Halcyon\Model[] getModels(array $results)
getModels gets the hydrated models
Parameters
- array $results
public bool insert($values)
insert a new record into the datasource.
Parameters
- $values
public int lastModified()
lastModified returns the last modified time of the object
public $this limit(int $value)
limit sets the "limit" value of the query
Parameters
- int $value
public array lists(string $column, string $key=NULL)
lists gets an array with the values of a given column
Parameters
- string $column
- string $key
public $this offset(int $value)
offset sets the "offset" value of the query
Parameters
- int $value
public $this remember(DateTime|int $minutes, string $key=NULL)
remember indicates that the query results should be cached
Parameters
- DateTime|int $minutes
- string $key
public $this rememberForever(string $key=NULL)
rememberForever indicates that the query results should be cached forever
Parameters
- string $key
public $this setModel($model)
setModel instance for the model being queried
Parameters
- $model
public October\Rain\Halcyon\Builder|static skip(int $value)
skip is an alias to set the "offset" value of the query
Parameters
- int $value
public October\Rain\Halcyon\Builder|static take(int $value)
take is an alias to set the "limit" value of the query
Parameters
- int $value
public string toCompiled()
toCompiled gets the compiled file content representation of the query
public int update($values)
update a record in the datasource.
Parameters
- $values
public $this whereFileName(string $fileName)
whereFileName switches mode to select a single template by its name
Parameters
- string $fileName
Protected methods
protected Illuminate\Cache\CacheManager getCache()
getCache object with tags assigned, if applicable
protected Closure getCacheCallback(string $fileName)
getCacheCallback used when caching queries
Parameters
- string $fileName
protected bool isCacheBusted(array $result)
isCacheBusted returns true if the cache for the file is busted. This only applies to single record selection
Parameters
- array $result
protected array processInitCacheData(array $data)
processInitCacheData initializes the cache data of each record
Parameters
- array $data
protected array runSelect()
runSelect runs the query as a "select" statement against the datasource
protected void validateDirectoryName(string $dirName=NULL)
validateDirectoryName validates the supplied directory path
Parameters
- string $dirName
protected void validateFileName(string $fileName=NULL)
validateFileName validates the supplied filename, extension and path
Parameters
- string $fileName
protected void validateFileNameExtension(string $fileName, array $allowedExtensions)
validateFileNameExtension validates whether a file has an allowed extension
Parameters
- string $fileName - Specifies a path to validate
- array $allowedExtensions - A list of allowed file extensions
protected void validateFileNamePath(string $filePath, int $maxNesting=5)
validateFileNamePath validates a template path Template directory and file names can contain only alphanumeric symbols, dashes and dots.
Parameters
- string $filePath - Specifies a path to validate
- int $maxNesting - Specifies the maximum allowed nesting level
protected boolean validateFileNamePattern(string $fileName)
validateFileNamePattern validates a template file or directory name template file names can contain only alphanumeric symbols, dashes, underscores and dots.
Parameters
- string $fileName - Specifies a path to validate