PEAR
[ class tree: PEAR ] [ index: PEAR ] [ all elements ]

Class: PEAR_Autoloader

Source Location: /PEAR-1.9.5/PEAR/Autoloader.php

Class Overview

PEAR
   |
   --PEAR_Autoloader

This class is for objects where you want to separate the code for some methods into separate classes. This is useful if you have a class with not-frequently-used methods that contain lots of code that you would like to avoid always parsing.


Author(s):

Version:

  • Release: 1.9.5

Copyright:

  • 1997-2009 The Authors

Methods


Inherited Variables

Inherited Methods

Class: PEAR

PEAR::PEAR()
Constructor. Registers this object in $_PEAR_destructor_object_list for destructor emulation if a destructor object exists.
PEAR::delExpect()
This method deletes all occurences of the specified element from the expected error codes stack.
PEAR::expectError()
This method is used to tell which errors you expect to get.
PEAR::getStaticProperty()
If you have a class that's mostly/entirely static, and you need static
PEAR::isError()
Tell whether a value is a PEAR error.
PEAR::loadExtension()
OS independent PHP extension load. Remember to take care on the correct extension name for case sensitive OSes.
PEAR::popErrorHandling()
Pop the last error handler used
PEAR::popExpect()
This method pops one element off the expected error codes stack.
PEAR::pushErrorHandling()
Push a new error handler on top of the error handler options stack. With this you can easily override the actual error handler for some code and restore it later with popErrorHandling.
PEAR::raiseError()
This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. If the $mode and $options parameters are not specified, the object's defaults are used.
PEAR::registerShutdownFunc()
Use this function to register a shutdown method for static classes.
PEAR::setErrorHandling()
Sets how errors generated by this object should be handled.
PEAR::staticPopErrorHandling()
PEAR::staticPushErrorHandling()
PEAR::throwError()
Simpler form of raiseError with fewer options. In most cases message, code and userinfo are enough.
PEAR::_PEAR()
Destructor (the emulated type of...). Does nothing right now, but is included for forward compatibility, so subclass destructors should always call it.

Class Details

[line 53]
This class is for objects where you want to separate the code for some methods into separate classes. This is useful if you have a class with not-frequently-used methods that contain lots of code that you would like to avoid always parsing.

The PEAR_Autoloader class provides autoloading and aggregation. The autoloading lets you set up in which classes the separated methods are found. Aggregation is the technique used to import new methods, an instance of each class providing separated methods is stored and called every time the aggregated method is called.



[ Top ]


Method Detail

addAggregateObject   [line 140]

void addAggregateObject( string $classname)

Add an aggregate object to this object. If the specified class

is not defined, loading it will be attempted following PEAR's file naming scheme. All the methods in the class will be aggregated, except private ones (name starting with an underscore) and constructors.

  • Access: public

Parameters:

string   $classname     what class to instantiate for the object.

[ Top ]

addAutoload   [line 94]

void addAutoload( string $method, [string $classname = null])

Add one or more autoload entries.
  • Access: public

Parameters:

string   $method     which method to autoload
string   $classname     (optional) which class to find the method in. If the $method parameter is an array, this parameter may be omitted (and will be ignored if not), and the $method parameter will be treated as an associative array with method names as keys and class names as values.

[ Top ]

removeAggregateObject   [line 169]

bool removeAggregateObject( string $classname)

Remove an aggregate object.
  • Return: TRUE if an object was removed, FALSE if not
  • Access: public

Parameters:

string   $classname     the class of the object to remove

[ Top ]

removeAutoload   [line 116]

bool removeAutoload( string $method)

Remove an autoload entry.
  • Return: TRUE if an entry was removed, FALSE if not
  • Access: public

Parameters:

string   $method     which method to remove the autoload entry for

[ Top ]

__call   [line 200]

mixed __call( string $method, string $args, &$retval)

Overloaded object call handler, called each time an undefined/aggregated method is invoked. This method repeats the call in the right aggregate object and passes on the return value.
  • Return: The return value from the aggregated method, or a PEAR error if the called method was unknown.

Parameters:

string   $method     which method that was called
string   $args     An array of the parameters passed in the original call
   &$retval     

[ Top ]


Documentation generated on Sat, 12 Jul 2014 14:00:20 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.