Packages

  • Nette
    • Application
      • Application\Diagnostics
      • Application\Responses
      • Application\Routers
      • Application\UI
    • Caching
      • Caching\Storages
    • ComponentModel
    • Config
    • Database
      • Database\Diagnostics
      • Database\Drivers
      • Database\Reflection
      • Database\Table
    • DI
    • Diagnostics
    • Forms
      • Forms\Controls
      • Forms\Rendering
    • Http
    • Iterators
    • Latte
      • Latte\Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
    • Templating
    • Utils
  • NetteModule
  • None
  • PHP

Classes

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

Interfaces

  • IAnnotation
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: 
  3: /**
  4:  * This file is part of the Nette Framework (http://nette.org)
  5:  *
  6:  * Copyright (c) 2004, 2011 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 method's parameter.
 17:  *
 18:  * @author     David Grudl
 19:  * @package Nette\Reflection
 20:  */
 21: class NParameterReflection extends ReflectionParameter
 22: {
 23:     /** @var mixed */
 24:     private $function;
 25: 
 26: 
 27:     public function __construct($function, $parameter)
 28:     {
 29:         parent::__construct($this->function = $function, $parameter);
 30:     }
 31: 
 32: 
 33: 
 34:     /**
 35:      * @return NClassReflection
 36:      */
 37:     public function getClass()
 38:     {
 39:         return ($ref = parent::getClass()) ? new NClassReflection($ref->getName()) : NULL;
 40:     }
 41: 
 42: 
 43: 
 44:     /**
 45:      * @return string
 46:      */
 47:     public function getClassName()
 48:     {
 49:         return ($tmp = NStrings::match($this, '#>\s+([a-z0-9_\\\\]+)#i')) ? $tmp[1] : NULL;
 50:     }
 51: 
 52: 
 53: 
 54:     /**
 55:      * @return NClassReflection
 56:      */
 57:     public function getDeclaringClass()
 58:     {
 59:         return ($ref = parent::getDeclaringClass()) ? new NClassReflection($ref->getName()) : NULL;
 60:     }
 61: 
 62: 
 63: 
 64:     /**
 65:      * @return NMethodReflection | FunctionReflection
 66:      */
 67:     public function getDeclaringFunction()
 68:     {
 69:         return is_array($this->function)
 70:             ? new NMethodReflection($this->function[0], $this->function[1])
 71:             : new NFunctionReflection($this->function);
 72:     }
 73: 
 74: 
 75: 
 76:     /********************* NObject behaviour ****************d*g**/
 77: 
 78: 
 79: 
 80:     /**
 81:      * @return NClassReflection
 82:      */
 83:     public function getReflection()
 84:     {
 85:         return new NClassReflection($this);
 86:     }
 87: 
 88: 
 89: 
 90:     public function __call($name, $args)
 91:     {
 92:         return NObjectMixin::call($this, $name, $args);
 93:     }
 94: 
 95: 
 96: 
 97:     public function &__get($name)
 98:     {
 99:         return NObjectMixin::get($this, $name);
100:     }
101: 
102: 
103: 
104:     public function __set($name, $value)
105:     {
106:         return NObjectMixin::set($this, $name, $value);
107:     }
108: 
109: 
110: 
111:     public function __isset($name)
112:     {
113:         return NObjectMixin::has($this, $name);
114:     }
115: 
116: 
117: 
118:     public function __unset($name)
119:     {
120:         NObjectMixin::remove($this, $name);
121:     }
122: 
123: }
124: 
Nette Framework 2.0beta1 (for PHP 5.2) API API documentation generated by ApiGen 2.3.0