Packages

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

Classes

  • NAnnotation
  • NAnnotationsParser
  • NClassReflection
  • NExtensionReflection
  • NFunctionReflection
  • NMethodReflection
  • NParameterReflection
  • NPropertyReflection

Interfaces

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