## Apache Zeta Components Manual :: Docs For Class ezcReflectionProperty

### Reflection::ezcReflectionProperty

### Class ezcReflectionProperty

Extends the ReflectionProperty class to provide type information using PHPDoc annotations.

Source for this file: /Reflection/src/property.php

    ReflectionProperty
       |
       --ezcReflectionProperty

Version: | //autogen//

### Inherited Constants

From ReflectionProperty (Internal Class):
`IS_PRIVATE = 1024` |
`IS_PROTECTED = 512` |
`IS_PUBLIC = 256` |
`IS_STATIC = 1` |

### Member Variables

protected ezcReflectionDocCommentParser | `$docParser`
protected ReflectionProperty | `$reflectionSource`

### Inherited Member Variables

From ReflectionProperty (Internal Class)
public | `$class`
public | `$name`

### Method Summary

public static mixed | `export( $class , $property , [ $return = false] )` Exports a ReflectionProperty instance.
public ezcReflectionProperty | `__construct( $class , [ $name = null] )` Constructs a new ezcReflectionProperty object
protected mixed | `forwardCallToReflectionSource( $method , [ $arguments = array()] )` Forwards a method invocation to either the reflection source passed to the constructor of this class when creating an instance or to the parent class.
public ezcReflectionAnnotation[] | `getAnnotations( [ $name = ''] )` Returns an array of annotations (optinally only annotations of a given name)
public ezcReflectionClass | `getDeclaringClass( )` Returns the declaring class.
public string | `getDocComment( )` Returns the PHPDoc comment of the property.
public int | `getModifiers( )` Returns a bitfield of the access modifiers for this property.
public string | `getName( )` Returns the name of the property.
public ezcReflectionType | `getType( )` Determines the type of the property based on source code annotations.
public mixed | `getValue( [ $object = null] )` Returns the property's value.
public boolean | `hasAnnotation( $annotation )` Checks whether the property is annotated with the annotation $annotation
public bool | `isDefault( )` Returns whether the property is a default property defined in the class.
public bool | `isPrivate( )` Returns true if this property has private as access level.
public bool | `isProtected( )` Returns true if this property has protected as access level.
public bool | `isPublic( )` Returns true if this property has public as access level.
public bool | `isStatic( )` Returns true if this property has is a static property.
public void | `setAccessible( $value )` Sets whether non-public properties can be requested
public void | `setValue( $object , [ $value = null] )` Changes the property's value.
public mixed | `__call( $method , $arguments )` Use overloading to call additional methods of the ReflectionProperty instance given to the constructor.
public string | `__toString( )` Returns a string representation

### Inherited Methods

From ReflectionProperty (Internal Class)
public ReflectionProperty | `constructor __construct ( $class, $name )`
public void | `export ( $class, $name, [$return = ] )`
public void | `getDeclaringClass ( )`
public void | `getDocComment ( )`
public void | `getModifiers ( )`
public void | `getName ( )`
public void | `getValue ( [$object = ] )`
public void | `isDefault ( )`
public void | `isPrivate ( )`
public void | `isProtected ( )`
public void | `isPublic ( )`
public void | `isStatic ( )`
public void | `setAccessible ( $visible )`
public void | `setValue ( $object, [$value = ] )`
public void | `__clone ( )`
public void | `__toString ( )`

### Methods

#### export

static mixed export( ReflectionClass|string $class , ReflectionProperty|string $property , [boolean $return = false] )

Exports a ReflectionProperty instance.

Returns the output if TRUE is specified for return, printing it otherwise. This is purely a wrapper method, which calls the corresponding method of the parent class.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$class` | ReflectionClass|string | ReflectionClass object or name of the class
`$property` | ReflectionProperty|string | ReflectionProperty object or name of the class
`$return` | boolean | Whether to return (TRUE) or print (FALSE) the output

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::export ( $class, $name, [$return = ] )` |

#### __construct

ezcReflectionProperty __construct( string|object|ReflectionProperty $class , [string $name = null] )

Constructs a new ezcReflectionProperty object

Throws an Exception in case the given property does not exist

##### Parameters:

Name | Type | Description
--- | --- | ---
`$class` | string|object|ReflectionProperty | Name, instance of the property's class or ReflectionProperty object of the property
`$name` | string | Name of the property to be reflected. Can be null or will be ignored if a ReflectionProperty object is given as first parameter.

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::constructor __construct ( $class, $name )` |

#### forwardCallToReflectionSource

mixed forwardCallToReflectionSource( string $method , [mixed[] $arguments = array()] )

Forwards a method invocation to either the reflection source passed to the constructor of this class when creating an instance or to the parent class.

This method is part of the dependency injection mechanism and serves as a helper for implementing wrapper methods without code duplication.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$method` | string | Name of the method to be invoked
`$arguments` | mixed[] | Arguments to be passed to the method

#### getAnnotations

ezcReflectionAnnotation[] getAnnotations( [string $name = ''] )

Returns an array of annotations (optinally only annotations of a given name)

##### Parameters:

Name | Type | Description
--- | --- | ---
`$name` | string | Name of the annotations

#### getDeclaringClass

ezcReflectionClass getDeclaringClass( )

Returns the declaring class.

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::getDeclaringClass ( )` |

#### getDocComment

string getDocComment( )

Returns the PHPDoc comment of the property.

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::getDocComment ( )` |

#### getModifiers

int getModifiers( )

Returns a bitfield of the access modifiers for this property.

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::getModifiers ( )` |

#### getName

string getName( )

Returns the name of the property.

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::getName ( )` |

#### getType

ezcReflectionType getType( )

Determines the type of the property based on source code annotations.

#### getValue

mixed getValue( [object $object = null] )

Returns the property's value.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$object` | object | An object from which the property value is obtained

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::getValue ( [$object = ] )` |

#### hasAnnotation

boolean hasAnnotation( string $annotation )

Checks whether the property is annotated with the annotation $annotation

##### Parameters:

Name | Type | Description
--- | --- | ---
`$annotation` | string | Name of the annotation

#### isDefault

bool isDefault( )

Returns whether the property is a default property defined in the class.

A default property is defined in the class definition. A non-default property is an instance specific state.

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::isDefault ( )` |

#### isPrivate

bool isPrivate( )

Returns true if this property has private as access level.

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::isPrivate ( )` |

#### isProtected

bool isProtected( )

Returns true if this property has protected as access level.

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::isProtected ( )` |

#### isPublic

bool isPublic( )

Returns true if this property has public as access level.

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::isPublic ( )` |

#### isStatic

bool isStatic( )

Returns true if this property has is a static property.

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::isStatic ( )` |

#### setAccessible

void setAccessible( boolean $value )

Sets whether non-public properties can be requested

##### Parameters:

Name | Type | Description
--- | --- | ---
`$value` | boolean | Whether non-public properties can be requested

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::setAccessible ( $visible )` |

#### setValue

void setValue( object $object , [mixed $value = null] )

Changes the property's value.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$object` | object | An object on which the property value will be changed
`$value` | mixed | Value of the property

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::setValue ( $object, [$value = ] )` |

#### __call

mixed __call( string $method , array $arguments )

Use overloading to call additional methods of the ReflectionProperty instance given to the constructor.

##### Parameters:

Name | Type | Description
--- | --- | ---
`$method` | string | Method to be called
`$arguments` | array | Arguments that were passed

#### __toString

string __toString( )

Returns a string representation

##### Redefinition of:

Method | Description
--- | ---
`ReflectionProperty::__toString ( )` |

Documentation generated by phpDocumentor 1.4.3