Class: Tipsy::Handler::PhpHandler

Inherits:
Tilt::Template
  • Object
show all
Defined in:
lib/tipsy/handler/php.rb

Overview

The PHP engine allows processing/rendering of php templates within the server environment. To process php templates, use the template.html.php naming syntax.

Instance Method Summary collapse

Instance Method Details

#evaluate(scope, locals, &block) ⇒ Object



18
19
20
21
# File 'lib/tipsy/handler/php.rb', line 18

def evaluate(scope, locals, &block)
  @engine.template = scope.template.full_path
  @output ||= @engine.render
end

#prepareObject



14
15
16
# File 'lib/tipsy/handler/php.rb', line 14

def prepare
  @engine = PhpProcessor.new(data)
end