cbt

Class Engine

lucee.Component
    extended by cbt.Engine

Copyright 2005-2007 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This Engine CFC interacts with the current template processor: Pebble

Class Attributes:
  • threadsafe
  •  
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any controller


    • access = public
    • returntype = any
    • inject = coldbox
    true false
    any engine
          The internal engine used for the markup builder, in our case this points to a Pebble Engine Builder.

    • access = public
    • returntype = any
    true false
    any javaLoader


    • access = public
    • returntype = any
    • inject = loader@cbjavaloader
    true false
    any moduleSettings


    • access = public
    • returntype = any
    • inject = coldbox:modulesettings:cbt
    true false
    any requestService


    • access = public
    • returntype = any
    • inject = coldbox:requestService
    true false
    any tmpDir
          Temporary path for on-demand rendering, leverages `getTempDirectory()`.

    • access = public
    • returntype = any
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    Engine clearOnDemandCache()
         Clears the ondemand cache.
    any discoverTemplate(any template, any event, [string module=''])
         Discover a template from the ColdBox Eco-System.
    private struct generateBindingContext(any event, [string module=''])
         Generate binding context.
    string getController()
    string getEngine()
    string getJavaLoader()
    string getModuleSettings()
    string getRequestService()
    string getTmpDir()
    any onDIComplete()
    string renderContent(string content, [struct context='[runtime expression]'])
         Render out from a-la-carte content instead of from files.
    string renderTemplate([string template=''], [struct context='[runtime expression]'], [string module=''])
         Render out a template using the templating language.
    any setController(any controller)
    any setEngine(any engine)
    any setJavaLoader(any javaLoader)
    any setModuleSettings(any moduleSettings)
    any setRequestService(any requestService)
    any setTmpDir(any tmpDir)
    private any toJava([any obj])
         Convert CFML to java types.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    controller

    property any controller

    Attributes:
    access - public
    required - false
    returntype - any
    inject - coldbox
    serializable - true

    engine

    property any engine

    The internal engine used for the markup builder, in our case this points to a Pebble Engine Builder.

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    javaLoader

    property any javaLoader

    Attributes:
    access - public
    required - false
    returntype - any
    inject - loader@cbjavaloader
    serializable - true

    moduleSettings

    property any moduleSettings

    Attributes:
    access - public
    required - false
    returntype - any
    inject - coldbox:modulesettings:cbt
    serializable - true

    requestService

    property any requestService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - coldbox:requestService
    serializable - true

    tmpDir

    property any tmpDir

    Temporary path for on-demand rendering, leverages `getTempDirectory()`

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    Method Detail

    clearOnDemandCache

    public Engine clearOnDemandCache()

    Clears the ondemand cache.


    discoverTemplate

    public any discoverTemplate(any template, any event, [string module=''])

    Discover a template from the ColdBox Eco-System

    Parameters:
    template - The template convention to lookup
    event - The request context
    module - If passed, look for the view in this module.

    generateBindingContext

    private struct generateBindingContext(any event, [string module=''])

    Generate binding context

    Parameters:
    event - The ColdBox Request context to bind with
    module - Are we in direct module template mode?

    getController

    public string getController()


    getEngine

    public string getEngine()


    getJavaLoader

    public string getJavaLoader()


    getModuleSettings

    public string getModuleSettings()


    getRequestService

    public string getRequestService()


    getTmpDir

    public string getTmpDir()


    onDIComplete

    public any onDIComplete()


    renderContent

    public string renderContent(string content, [struct context='[runtime expression]'])

    Render out from a-la-carte content instead of from files. Internally, we will use the RAM file resource to stream the intermediate content

    Parameters:
    content - The templating content to convert
    context - A structure of data to bind the rendering with, so you can access it within the `{{ }}` or `{{{ }}}` notations.

    renderTemplate

    public string renderTemplate([string template=''], [struct context='[runtime expression]'], [string module=''])

    Render out a template using the templating language

    Parameters:
    template - The template to render. By convention we will look in the views convention of the current application or running module. This can also be an absolute path.
    context - A structure of data to bind the rendering with, so you can access it within the `{{ }}` or `{{{ }}}` notations.
    module - If passed, then we will bypass lookup for templates and go to the specified module to render the template from.

    setController

    public any setController(any controller)

    Parameters:
    controller

    setEngine

    public any setEngine(any engine)

    Parameters:
    engine

    setJavaLoader

    public any setJavaLoader(any javaLoader)

    Parameters:
    javaLoader

    setModuleSettings

    public any setModuleSettings(any moduleSettings)

    Parameters:
    moduleSettings

    setRequestService

    public any setRequestService(any requestService)

    Parameters:
    requestService

    setTmpDir

    public any setTmpDir(any tmpDir)

    Parameters:
    tmpDir

    toJava

    private any toJava([any obj])

    Convert CFML to java types Experimental, removing for now until further conventions can be done with CFC types.

    Parameters:
    obj - Target objects for conversion