-
Docs
Backend
-
Behaviors
-
Classes
-
Controllers
-
Database
-
Seeds
-
-
Facades
-
FormWidgets
-
Helpers
-
Exception
- Backend
-
-
Models
-
ReportWidgets
-
Skins
-
Traits
-
Widgets
- ServiceProvider
-
-
Cms
-
Classes
- Asset
- AutoDatasource
- CmsCompoundObject
- CmsController
- CmsException
- CmsObject
- CmsObjectCollection
- CodeBase
- CodeParser
- ComponentBase
- ComponentHelpers
- ComponentManager
- ComponentPartial
- Content
- Controller
- Layout
- LayoutCode
- MediaLibrary
- MediaLibraryItem
- MediaViewHelper
- Meta
- ObjectMemoryCache
- Page
- PageCode
- Partial
- PartialCode
- PartialStack
- Router
- Theme
- ThemeManager
-
Components
-
Contracts
-
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
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
Console
-
Controllers
-
Database
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
filter
-
form
-
list
-
menu
-
page
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
object
-
page
-
router
-
template
-
theme
-
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
system
-
assets
-
console
-
mirror
-
theme
-
-
reportwidgets
-
settings
- extendConfigFile
-
-
translator
-
-
Library
-
Argon
-
Auth
-
Models
- AuthException
- Manager
-
-
Config
-
Cookie
-
Middleware
-
-
Database
-
Attach
-
Behaviors
-
Concerns
-
Connections
-
Connectors
-
Models
-
Relations
-
Schema
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- DataFeed
- Dongle
- MemoryCache
- Model
- ModelBehavior
- ModelException
- 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
-
Router
-
Scaffold
-
Support
-
Translation
-
- Documentation
- API
- Library
- Parse
- Syntax
- Parser
October\Rain\Parse\Syntax\Parser
Source: ~/vendor/october/rain/src/Parse/Syntax/Parser.php
Dynamic Syntax parser
Protected properties
protected October\Rain\Parse\Syntax\FieldParser $fieldParser
Field parser instance.
protected October\Rain\Parse\Bracket $textParser
Text parser instance.
protected string $varPrefix
A prefix to place before all variable references when rendering the view.
Public methods
public void __construct(array $options=NULL, string $template=array())
Constructor. Available options:
- varPrefix: Prefix to add to every top level parameter.
- tagPrefix: Prefix to add to all tags, in addition to tags without a prefix.
Parameters
- array $options
- string $template - Template to parse.
public array getFieldValues()
Returns the default field values defined in the template
public static self parse(string $template, array $options=array())
Static helper for new instances of this class.
Parameters
- string $template
- array $options
public string render(array $vars=array(), array $options=array())
Renders the template fields to their actual values
Parameters
- array $vars
- array $options
public array toEditor()
Returns an array of all fields and their options.
public string toTwig()
Returns the template with fields replaced with Twig markup
public string toView()
Returns the template with fields replaced with the simple templating engine used by the TextParser class.
Protected methods
protected string evalSimpleViewField(string $field, array $params, $prefix=NULL)
Processes a field type and converts it to the Simple engine.
Parameters
- string $field
- array $params
- $prefix
protected string evalTwigViewField(string $field, array $params, string $prefix=NULL)
Processes a field type and converts it to the Twig engine.
Parameters
- string $field
- array $params
- string $prefix
protected void processRepeatingTag($engine, $template, $field, $tagDetails)
Parameters
- $engine
- $template
- $field
- $tagDetails
protected void processTag($engine, $template, $field, $tagString)
Parameters
- $engine
- $template
- $field
- $tagString
protected string toViewEngine(string $engine)
Parses the template to a specific view engine (Twig, Simple)
Parameters
- string $engine