Class PHRUTS_ClassLoader

Description

The ClassLoader is a way of customizing the way PHP gets its classes and loads them into memory.

  • author: John WILDENAUER <jwilde@users.sourceforge.net> (PHP4 port of Struts)
  • author: Olivier HENRY <oliv.henry@gmail.com> (PHP5 port of Struts)
  • version: $Id: PHRUTS_ClassLoader.php,v 1.3 2008/05/28 15:52:27 ohenry Exp $
  • copyright: Copyright PHruts 2008

Located in /util/PHRUTS_ClassLoader.php (line 34)


	
			
Variable Summary
static string $phpExtensionFile
Method Summary
static boolean classIsAssignableFrom (string $class, string $classFrom)
static string getClassName (string $name)
static boolean isValidClassName (string $name)
static string loadClass (string $name)
static $object newInstance (string $name, [string $parent = null])
static void setPhpExtensionFile (string $phpExtensionFile)
Variables
static string $phpExtensionFile = '.php' (line 40)

The PHP extension file used to store PHP class.

  • access: protected
Methods
static method classIsAssignableFrom (line 87)

Discover whether an instance of the class from would be an instance of the class as well.

  • return: Whether an instance of classFrom would be an instance of class as well
  • access: public
static boolean classIsAssignableFrom (string $class, string $classFrom)
  • string $class
  • string $classFrom
static method getClassName (line 68)

Return only the class name of a fully qualified name.

  • access: public
static string getClassName (string $name)
  • string $name: Fully qualified name of a class (with packages)
static method isValidClassName (line 56)

Check if a fully qualified class name is valid.

  • return: Return true if the class name is valid
  • access: public
static boolean isValidClassName (string $name)
  • string $name: Fully qualified name of a class (with packages)
static method loadClass (line 111)

Load a class.

  • return: Return the only class name
  • throws: PHRUTS_IllegalArgumentException - If the class name is not valid
  • throws: PHRUTS_ClassNotFoundException - If the class cannot be found
  • access: public
static string loadClass (string $name)
  • string $name: The fully qualified name of the class (with packages)
static method newInstance (line 154)

Get a new instance of a class by calling the no-required-argument constructor.

  • return: New instance of the class
  • throws: PHRUTS_InstantiationException - If there is not a no-required-argument constructor for this class.
  • throws: PHRUTS_IllegalArgumentException - If the class name is not valid
  • throws: PHRUTS_ClassNotFoundException - If the class cannot be found
  • access: public
static $object newInstance (string $name, [string $parent = null])
  • string $name: The fully qualified name of the class (with packages)
  • string $parent: If is set, the class must be a subclass of the class which name is equal to "parent"
static method setPhpExtensionFile (line 46)
  • access: public
static void setPhpExtensionFile (string $phpExtensionFile)
  • string $phpExtensionFile: The PHP extension file used to store PHP class

Documentation generated on Sat, 31 May 2008 15:45:54 +0200 by phpDocumentor 1.4.1