<?php
/**
* Enlight
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://enlight.de/license
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@shopware.de so we can send you a copy immediately.
*
* @category Enlight
* @package Enlight_View
* @copyright Copyright (c) 2011, shopware AG (http://www.shopware.de)
* @license http://enlight.de/license New BSD License
* @version $Id$
* @author Heiner Lohaus
* @author $Author$
*/
/**
* Basic Enlight view class for each specified view component.
*
* The Enlight_View defines the interface for the view within a controller.
* If you want to implement your own view class then you have to implement this interface.
*
* @category Enlight
* @package Enlight_View
* @copyright Copyright (c) 2011, shopware AG (http://www.shopware.de)
* @license http://enlight.de/license New BSD License
*/
abstract class Enlight_View
{
/**
* Sets the template path list.
*
* @param string|array $path
* @return Enlight_View
*/
abstract public function setTemplateDir($path);
/**
* Adds a path to the template list.
*
* @param string|array $path
* @return Enlight_View
*/
abstract public function addTemplateDir($path);
/**
* Checks if a template is stored.
*
* @return bool
*/
abstract public function hasTemplate();
/**
* Assigns a specified value to the template.
*
* @param string $spec
* @param mixed $value
* @param bool $nocache
* @param int $scope
* @return Enlight_View
*/
abstract public function assign($spec, $value = null, $nocache = false, $scope = null);
/**
* Resets a specified value or all values.
*
* @param string $spec
* @return Enlight_View
*/
abstract public function clearAssign($spec = null);
/**
* Returns a specified value or all values.
*
* @param string|null $spec
* @return mixed|array
*/
abstract public function getAssign($spec = null);
/**
* Renders the current template.
*
* @return string
*/
abstract public function render();
/**
* Magic setter
*
* @param $name
* @param mixed $value
* @return void
*/
public function __set($name, $value = null)
{
$this->assign($name, $value);
}
/**
* Magic getter
*
* @param $name
* @return array|mixed
*/
public function __get($name)
{
return $this->getAssign($name);
}
/**
* Magic isset
*
* @param string $name
* @return bool
*/
public function __isset($name)
{
return ($this->getAssign($name) !== null);
}
/**
* Magic unset
*
* @param $name
* @return void
*/
public function __unset($name)
{
$this->clearAssign($name);
}
}
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| Collection/ | 2016-11-07 15:58 | 6.7 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Components/ | 2016-11-07 16:04 | 99.29 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Config/ | 2016-11-07 16:00 | 57.36 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Controller/ | 2016-11-07 16:03 | 129.95 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Event/ | 2016-11-07 16:00 | 43.17 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Hook/ | 2016-11-07 15:58 | 21.67 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Plugin/ | 2016-11-07 16:00 | 28.16 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Template/ | 2016-11-07 16:00 | 71.4 KB | 76129f60960:kunden | dxwrx-rx-r | |
| View/ | 2016-11-07 15:58 | 11.41 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Application.php | 2016-11-07 15:58 | 4.72 KB | 76129f60960:kunden | -xw-x----- | |
| Bootstrap.php | 2016-11-07 15:58 | 999 B | 76129f60960:kunden | -xw-x----- | |
| Class.php | 2016-11-07 15:58 | 5.46 KB | 76129f60960:kunden | -xw-x----- | |
| Config.php | 2016-11-07 15:58 | 11.66 KB | 76129f60960:kunden | -xw-x----- | |
| Exception.php | 2016-11-07 15:58 | 3.01 KB | 76129f60960:kunden | -xw-x----- | |
| Hook.php | 2016-11-07 15:58 | 1.07 KB | 76129f60960:kunden | -xw-x----- | |
| Loader.php | 2016-11-07 15:58 | 9.67 KB | 76129f60960:kunden | -xw-x----- | |
| Singleton.php | 2016-11-07 15:58 | 1.15 KB | 76129f60960:kunden | -xw-x----- | |
| View.php | 2016-11-07 15:58 | 3.13 KB | 76129f60960:kunden | -xw-x----- | |