Class ActiveRecord_Proxy

Description

ActiveRecord_Proxy allows for limited access to some protected methods of an ActiveRecord object. See ActiveRecord_Base::add_method_proxy() for more information.

Located in /activerecord/lib/ActiveRecord/Proxy.php (line 11)


	
			
Direct descendents
Class Description
 class ActiveRecord_ProxyMethod ActiveRecord_ProxyMethod encapsulates a proxied method for an ActiveRecord object. See ActiveRecord_Base::add_method_proxy() for more information.
Variable Summary
Method Summary
 void add_method_proxy (string $name, callback $callback)
 void delete_cached_attribute (string $name)
 boolean has_cached_attribute (string $name)
 void initialize (ActiveRecord_Base $record,  &$attributes,  &$cached_attributes, [object $metaInf = null], array $attributes, array $cached_attributes)
 mixed read_attribute (string $name)
 mixed read_attribute_before_type_cast (string $name)
 mixed read_cached_attribute (string $name)
 void write_attribute (string $name, mixed $value)
 void write_cached_attribute (string $name, mixed $value)
Variables
mixed $attributes (line 13)
  • access: protected
mixed $cached_attributes (line 14)
  • access: protected
mixed $metaInf (line 15)
  • access: protected
mixed $record (line 12)
  • access: protected
Methods
add_method_proxy (line 117)

Calls add_proxy_method on the object the method was originally invoked on.

  • access: public
void add_method_proxy (string $name, callback $callback)
  • string $name: The name of the method to proxy
  • callback $callback: The callback to invoke for the method
add_validation (line 129)

Add a validation to the class

  • access: public
void add_validation (ActiveRecord_Validation $validation)
delete_cached_attribute (line 106)

Calls delete_cached_attribute on the object the method was originally invoked on.

  • access: public
void delete_cached_attribute (string $name)
  • string $name: The attribute name
get_meta_info (line 143)

Return the class information object

  • access: public
ActiveRecord_MetaInfo get_meta_info ()
has_cached_attribute (line 73)

Calls has_cached_attribute on the object the method was originally invoked on.

  • access: public
boolean has_cached_attribute (string $name)
  • string $name: The attribute name
initialize (line 25)

Initialize (or re-initialize) the proxy

  • access: public
void initialize (ActiveRecord_Base $record,  &$attributes,  &$cached_attributes, [object $metaInf = null], array $attributes, array $cached_attributes)
  • ActiveRecord_Base $record: The object being proxied
  • array $attributes: Attribute set of the object
  • array $cached_attributes: Cached attribute set of the object
  • object $metaInf: The class information object
  • &$attributes
  • &$cached_attributes
read_attribute (line 39)

Calls read_attribute on the object the method was originally invoked on.

  • access: public
mixed read_attribute (string $name)
  • string $name: The attribute name
read_attribute_before_type_cast (line 52)

Calls read_attribute_before_type_cast on the object the method was originally invoked on.

  • access: public
mixed read_attribute_before_type_cast (string $name)
  • string $name: The attribute name
read_cached_attribute (line 83)

Calls read_cached_attribute on the object the method was originally invoked on.

  • access: public
mixed read_cached_attribute (string $name)
  • string $name: The attribute name
write_attribute (line 62)

Calls write_attribute on the object the method was originally invoked on.

  • access: public
void write_attribute (string $name, mixed $value)
  • string $name: The attribute name
  • mixed $value: The new value for the attribute
write_cached_attribute (line 95)

Calls write_cached_attribute on the object the method was originally invoked on.

  • access: public
void write_cached_attribute (string $name, mixed $value)
  • string $name: The attribute name
  • mixed $value: The attribute value to cache

Documentation generated on Wed, 25 Apr 2012 09:46:44 -0700 by phpDocumentor 1.4.3