Catalyst::View::PHP

Template View Class
Download

Catalyst::View::PHP Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Rusty Conover
  • Publisher web site:
  • http://search.cpan.org/~rconover/

Catalyst::View::PHP Tags


Catalyst::View::PHP Description

Template View Class Catalyst::View::PHP is the Catalyst view class for the PHP::Interpreter. Your application subclass should inherit from this class. This plugin renders the template specified in $c->stash->{template}, or failing that, $c->request->match. The template variables are set up from the contents of $c->stash, augmented with template variable base set to Catalyst's $c->req->base, template variable c to Catalyst's $c, and template variable name to Catalyst's $c->config->{name}. The output is stored in $c->response->output.If you want to override PHP config settings, you can do it in your application's view class by setting __PACKAGE__->config->{OPTION}, as shown in the Synopsis. See the available options document on the PHP::Interpreter documentation.In PHP the variables exported are the requests parameters for $_GET and $_POST depending on the method used to send the request. Also all of the stash is exported just like in TemplateToolkit, and you can access the current context by calling $c.SYNOPSIS # use the helper myapp_create.pl view PHP PHP # lib/MyApp/View/PHP.pm package MyApp::View::PHP; use base 'Catalyst::View::PHP'; # To set the override the PHP include path set the path in the config. __PACKAGE__->config->{INCLUDE_PATH} = '/usr/local/generic/templates:/usr/local/myapp/templates'; 1; # Meanwhile, maybe in a private C< end > action $c->forward('MyApp::View::PHP'); Requirements: · Perl


Catalyst::View::PHP Related Software