source: branches/0.4/web/addons/job_monarch/dwoo/Dwoo/Adapters/ZendFramework/Dwoo.php @ 755

Last change on this file since 755 was 755, checked in by ramonb, 11 years ago
  • add Dwoo
File size: 1.1 KB
Line 
1<?php
2
3/**
4 * Dwoo base class for ZendFramework
5 *
6 * This software is provided 'as-is', without any express or implied warranty.
7 * In no event will the authors be held liable for any damages arising from the
8 * use of this software.
9 *
10 * @author     Jordi Boggiano <j.boggiano@seld.be>
11 * @author     Marc Hodgins <mjh@hodginsmedia.com>
12 * @copyright  Copyright (c) 2010, Jordi Boggiano
13 * @license    http://dwoo.org/LICENSE   Modified BSD License
14 * @link       http://dwoo.org/
15 * @version    1.2.0
16 * @date       2010-02-28
17 * @package    Dwoo
18 */
19class Dwoo_Adapters_ZendFramework_Dwoo extends Dwoo_Core
20{
21        /**
22         * Redirects all unknown properties to plugin proxy
23         * to support $this->viewVariable from within templates
24         *
25         * @param string $name Property name
26         * @return mixed
27         */
28        public function __get($name)
29        {
30                if (isset($this->getPluginProxy()->view->$name)) {
31                        return $this->getPluginProxy()->view->$name;
32                }
33                $trace = debug_backtrace();
34                trigger_error('Undefined property via __get(): ' . $name .
35                                          ' in ' . $trace[0]['file'] .
36                                          ' on line ' . $trace[0]['line'], E_USER_NOTICE);
37                return null;
38        }
39}
Note: See TracBrowser for help on using the repository browser.