Completed
Push — master ( bf2930...494091 )
by David
07:08 queued 03:26
created

lib/Dwoo/Adapters/ZendFramework/Dwoo.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * Copyright (c) 2013-2016
5
 *
6
 * @category  Library
7
 * @package   Dwoo\Adapters\ZendFramework
8
 * @author    Jordi Boggiano <[email protected]>
9
 * @author    David Sanchez <[email protected]>
10
 * @copyright 2008-2013 Jordi Boggiano
11
 * @copyright 2013-2016 David Sanchez
12
 * @license   http://dwoo.org/LICENSE Modified BSD License
13
 * @version   1.3.0
14
 * @date      2016-09-19
15
 * @link      http://dwoo.org/
16
 */
17
class Dwoo_Adapters_ZendFramework_Dwoo extends Dwoo_Core
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
18
{
19
    /**
20
     * Redirects all unknown properties to plugin proxy
21
     * to support $this->viewVariable from within templates.
22
     *
23
     * @param string $name Property name
24
     *
25
     * @return mixed
26
     */
27
    public function __get($name)
28
    {
29
        if (isset($this->getPluginProxy()->view->$name)) {
30
            return $this->getPluginProxy()->view->$name;
31
        }
32
        $trace = debug_backtrace();
33
        trigger_error(
34
            'Undefined property via __get(): '.$name.
35
                      ' in '.$trace[0]['file'].
36
            ' on line '.$trace[0]['line'], E_USER_NOTICE
37
        );
38
39
        return null;
40
    }
41
}
42