PHP Classes

File: src/View.php

Recommend this page to a friend!
  Classes of Thierry Feuzeu   Jaxon for CakePHP   src/View.php   Download  
File: src/View.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Jaxon for CakePHP
This package integrates the Jaxon library into the
Author: By
Last change: Fixed class declaration.
Adapted to the new class hierarchy is jaxon-core.
Date: 2 years ago
Size: 1,054 bytes
 

Contents

Class file image Download
<?php

namespace Jaxon\Cake;

use
Jaxon\Utils\View\Store;
use
Jaxon\Contracts\View as ViewContract;

class
View implements ViewContract
{
    protected
$view; // CakePHP View object

   
public function __construct($view)
    {
       
$this->view = $view;
    }

   
/**
     * Add a namespace to this view renderer
     *
     * @param string $sNamespace The namespace name
     * @param string $sDirectory The namespace directory
     * @param string $sExtension The extension to append to template names
     *
     * @return void
     */
   
public function addNamespace($sNamespace, $sDirectory, $sExtension = '')
    {}

   
/**
     * Render a view
     *
     * @param Store $store A store populated with the view data
     *
     * @return string The string representation of the view
     */
   
public function render(Store $store)
    {
       
// Render the template
       
return trim($this->view->element($store->getViewName(), $store->getViewData()), " \t\n");
    }
}