Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

Ref.php File Reference

Go to the source code of this file.

Classes

class  Ref

Functions

 ref (&$obj)
 is_ref ($obj)


Function Documentation

is_ref obj  ) 
 

Returns true if the object is a Ref object.

Parameters:
mixed $obj -- any variable that must be tested.
Returns:
boolean

Definition at line 56 of file Ref.php.

Referenced by Ref::Ref().

ref &$  obj  ) 
 

Create a new Ref object referencing specified object or variable.

Any modification of the source object modify the Refence content, any modification of the reference obj modify the source object.

The referenced object can be reached using the reference object using the 'obj' property.

<?php

$a = new Foo(); $ref_a = Ref($a);

$ref_a->obj->doBar(); // call doBar() on $a

?>

Parameters:
mixed $obj -- the object or variable to reference.
Returns:
Ref

Definition at line 44 of file Ref.php.

Referenced by OHash::__construct(), OHash::set(), OHash::setAll(), OHash::setRef(), and OHash::values().


Generated on Tue Jun 29 23:40:12 2004 for Mediawiki by doxygen 1.3.7