symfony API

sfSimpleAutoload Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfSimpleAutoload class.

Method Summary

  • addDirectory($dir, $ext)
    Adds a directory to the autoloading system if not yet present and give it the highest possible precedence.
  • addFile($file, $register)
    Adds a file to the autoloading system.
  • addFiles($files, $register)
    Adds files to the autoloading system.
  • boolean autoload($class)
    Handles autoloading of classes.
  • string|null getClassPath($class)
    Returns the path where a particular class can be found.
  • sfSimpleAutoload getInstance($cacheFile)
    Retrieves the singleton instance of this class.
  • loadCache()
    Loads the cache.
  • loadConfiguration($files)
    Loads configuration from the supplied files.
  • void register()
    Register sfSimpleAutoload in spl autoloader.
  • reload()
    Reloads cache.
  • removeCache()
    Removes the cache.
  • saveCache()
    Saves the cache.
  • setClassPath($class, $path)
    Sets the path for a particular class.
  • void unregister()
    Unregister sfSimpleAutoload from spl autoloader.
  • __construct()

Method Details

  • addDirectory ($dir, $ext)

    $dir The directory to look for classes
    $ext The extension to look for

    Adds a directory to the autoloading system if not yet present and give it the highest possible precedence.

  • addFile ($file, $register)

    $file A file path
    $register Whether to register those files as single entities (used when reloading)

    Adds a file to the autoloading system.

  • addFiles ($files, $register)

    $files An array of files
    $register Whether to register those files as single entities (used when reloading)

    Adds files to the autoloading system.

  • (boolean) autoload ($class)

    $class A class name.

    Handles autoloading of classes.

    returns Returns true if the class has been loaded

  • (string|null) getClassPath ($class)

    $class A PHP class name

    Returns the path where a particular class can be found.

    returns An absolute path

  • (sfSimpleAutoload) getInstance ($cacheFile)

    $cacheFile The file path to save the cache

    Retrieves the singleton instance of this class.

    returns A sfSimpleAutoload implementation instance.

  • loadCache ()

    Loads the cache.

  • loadConfiguration ($files)

    $files An array of autoload.yml files

    Loads configuration from the supplied files.

  • (void) register ()

    Register sfSimpleAutoload in spl autoloader.

  • reload ()

    Reloads cache.

  • removeCache ()

    Removes the cache.

  • saveCache ()

    Saves the cache.

  • setClassPath ($class, $path)

    $class A PHP class name
    $path An absolute path

    Sets the path for a particular class.

  • (void) unregister ()

    Unregister sfSimpleAutoload from spl autoloader.

  • __construct ()