Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationLatte
      • ApplicationTracy
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsLatte
      • Framework
      • HttpTracy
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Templating
    • Utils
  • NetteModule
  • none
  • Tracy

Classes

  • NetteAccessor
  • NetteExtension
  • TracyBridge
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage
 1: <?php
 2: 
 3: /**
 4:  * This file is part of the Nette Framework (https://nette.org)
 5:  *
 6:  * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
 7:  *
 8:  * For the full copyright and license information, please view
 9:  * the file license.txt that was distributed with this source code.
10:  */
11: 
12: namespace Nette\Bridges\Framework;
13: 
14: use Nette;
15: 
16: 
17: /**
18:  * @deprecated, for back compatibility
19:  */
20: class NetteAccessor extends Nette\Object
21: {
22:     private $container;
23: 
24: 
25:     public function __construct(Nette\DI\Container $container)
26:     {
27:         $this->container = $container;
28:     }
29: 
30: 
31:     public function __call($name, $args)
32:     {
33:         if (substr($name, 0, 6) === 'create') {
34:             $method = $this->container->getMethodName('nette.' . substr($name, 6));
35:             trigger_error("Factory accessing via nette->$name() is deprecated, use $method().", E_USER_DEPRECATED);
36:             return call_user_func_array(array($this->container, $method), $args);
37:         }
38:         throw new Nette\NotSupportedException;
39:     }
40: 
41: 
42:     public function &__get($name)
43:     {
44:         trigger_error("Service accessing via nette->$name is deprecated, use 'nette.$name'.", E_USER_DEPRECATED);
45:         $service = $this->container->getService("nette.$name");
46:         return $service;
47:     }
48: 
49: }
50: 
Nette 2.2 API documentation generated by ApiGen 2.8.0