• PHP reference
  • Helpers

Autoloader

class Autoloader extends ExtendableObject

A simple auto loading class that is fed by the 'modules' directory and by installed Composer packages.

Constants

CLASS_SEPARATOR

Separator in class namespace definitions.

Methods

__construct()

Autoloader constructor.

addPath(string $path, boolean $include_root = true)

Add an autoload directory.

Parameters

  • string $path
  • boolean $include_root

autoload(string $class_name)

Autoload a class from the 'modules' directory.

Parameters

  • string $class_name

getDirectories()

Setup default include paths.

Inherited from ExtendableObject

final static ExtendableObject instance()

Get instance.

Return Value

final static boolean hasInstance()

Check whether there is an instance of this class available.

Return Value

  • boolean

final boolean extension($extension)

Call class method, if it exists.

Parameters

  • $extension

Return Value

  • boolean