Namespaces

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • Annotation
  • AnnotationsParser
  • ClassReflection
  • ExtensionReflection
  • FunctionReflection
  • MethodReflection
  • ParameterReflection
  • PropertyReflection

Interfaces

  • IAnnotation
  • Overview
  • Namespace
  • Class
  • Tree
  • Other releases
  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\Reflection;
 13: 
 14: use Nette,
 15:     Nette\ObjectMixin,
 16:     Nette\Annotations;
 17: 
 18: 
 19: 
 20: /**
 21:  * Reports information about a extension.
 22:  *
 23:  * @author     David Grudl
 24:  */
 25: class ExtensionReflection extends \ReflectionExtension
 26: {
 27: 
 28:     public function __toString()
 29:     {
 30:         return 'Extension ' . $this->getName();
 31:     }
 32: 
 33: 
 34: 
 35:     /********************* Reflection layer ****************d*g**/
 36: 
 37: 
 38: 
 39:     public function getClasses()
 40:     {
 41:         $res = array();
 42:         foreach (parent::getClassNames() as $val) {
 43:             $res[$val] = new ClassReflection($val);
 44:         }
 45:         return $res;
 46:     }
 47: 
 48: 
 49: 
 50:     public function getFunctions()
 51:     {
 52:         foreach ($res = parent::getFunctions() as $key => $val) {
 53:             $res[$key] = new FunctionReflection($key);
 54:         }
 55:         return $res;
 56:     }
 57: 
 58: 
 59: 
 60:     /********************* Nette\Object behaviour ****************d*g**/
 61: 
 62: 
 63: 
 64:     /**
 65:      * @return Nette\Reflection\ClassReflection
 66:      */
 67:     public static function getReflection()
 68:     {
 69:         return new Nette\Reflection\ClassReflection(get_called_class());
 70:     }
 71: 
 72: 
 73: 
 74:     public function __call($name, $args)
 75:     {
 76:         return ObjectMixin::call($this, $name, $args);
 77:     }
 78: 
 79: 
 80: 
 81:     public function &__get($name)
 82:     {
 83:         return ObjectMixin::get($this, $name);
 84:     }
 85: 
 86: 
 87: 
 88:     public function __set($name, $value)
 89:     {
 90:         return ObjectMixin::set($this, $name, $value);
 91:     }
 92: 
 93: 
 94: 
 95:     public function __isset($name)
 96:     {
 97:         return ObjectMixin::has($this, $name);
 98:     }
 99: 
100: 
101: 
102:     public function __unset($name)
103:     {
104:         throw new \MemberAccessException("Cannot unset the property {$this->reflection->name}::\$$name.");
105:     }
106: 
107: }
108: 
Nette Framework 0.9.7 API documentation generated by ApiGen 2.3.0