Overview

Namespaces

  • None
  • Xmf
    • Database
    • Module
      • Helper
    • Template
  • Xoops
    • Auth
    • Core
      • Cache
      • Database
        • Logging
        • Schema
      • Exception
      • Handler
        • Scheme
      • Kernel
        • Dtype
        • Handlers
        • Model
      • Lists
      • Locale
        • Punic
      • Service
        • Contract
      • Session
      • Text
        • Sanitizer
          • Extensions
      • Theme
        • Plugins
    • Form
    • Html
    • Locale
    • Module
      • Helper
      • Plugin

Classes

  • Assets
  • ComposerUtility
  • Events
  • FilterInput
  • FixedGroups
  • HttpRequest
  • Logger
  • MediaUploader
  • MimeTypes
  • PreloadItem
  • Psr0ClassLoader
  • Psr4ClassLoader
  • Random
  • Registry
  • Request
  • Security
  • XoopsTpl
  • Yaml

Interfaces

  • AttributeInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class Psr0ClassLoader

SplClassLoader implementation that implements the technical interoperability standards for PHP 5.3 namespaces and class names.

From the PHP Framework Interop Group

Examples

Namespace: Xoops\Core
Package: Xoops
Category: Xoops\Core\Psr0ClassLoader
Author: Jonathan H. Wage jonwage@gmail.com
Author: Roman S. Borschel roman@code-factory.org
Author: Matthew Weier O'Phinney matthew@zend.com
Author: Kris Wallsmith kris.wallsmith@gmail.com
Author: Fabien Potencier fabien.potencier@symfony-project.org
Author: Richard Griffith richard@geekwright.com
See: http://www.php-fig.org/
Link: https://gist.github.com/jwage/221634
Code:

$myLibLoader = new SplClassLoader('mylib', '/path/to/mylib/src'); $myLibLoader->register();

$zendLoader = new SplClassLoader('Zend', '/path/to/zend/lib');
$zendLoader->setNamespaceSeparator('_');
$zendLoader->register();

Endcode
Located at oops_lib/Xoops/Core/Psr0ClassLoader.php
Methods summary
public
# __construct( string $ns = null, string $includePath = null )

Creates a new SplClassLoader that loads classes of the specified namespace.

Creates a new SplClassLoader that loads classes of the specified namespace.

Parameters

$ns
The namespace to use.
$includePath
Path to the namespaces top directory
public static SplClassLoader
# addLoader( type $namespace, type $path, type $separator = '\\', type $extension = '.php' )

addLoader sets all basic options and registers the autoloader

addLoader sets all basic options and registers the autoloader

Parameters

$namespace
namespace
$path
path to the namespace's top directory
$separator
namespace separator
$extension
file extension

Returns

SplClassLoader
public
# setNamespaceSeparator( string $sep )

Sets the namespace separator used by classes in the namespace of this class loader.

Sets the namespace separator used by classes in the namespace of this class loader.

Parameters

$sep
The separator to use.
public string
# getNamespaceSeparator( )

Gets the namespace seperator used by classes in the namespace of this class loader.

Gets the namespace seperator used by classes in the namespace of this class loader.

Returns

string
public
# setIncludePath( string $includePath )

Sets the base include path for all class files in the namespace of this class loader.

Sets the base include path for all class files in the namespace of this class loader.

Parameters

$includePath
include path
public string
# getIncludePath( )

Gets the base include path for all class files in the namespace of this class loader.

Gets the base include path for all class files in the namespace of this class loader.

Returns

string
$includePath include path
public
# setFileExtension( string $fileExtension )

Sets the file extension of class files in the namespace of this class loader.

Sets the file extension of class files in the namespace of this class loader.

Parameters

$fileExtension
file extension
public string
# getFileExtension( )

Gets the file extension of class files in the namespace of this class loader.

Gets the file extension of class files in the namespace of this class loader.

Returns

string
$fileExtension
public
# register( )

Installs this class loader on the SPL autoload stack.

Installs this class loader on the SPL autoload stack.

public
# unregister( )

Uninstalls this class loader from the SPL autoloader stack.

Uninstalls this class loader from the SPL autoloader stack.

public
# loadClass( string $className )

Loads the given class or interface.

Loads the given class or interface.

Parameters

$className
The name of the class to load.
API documentation generated by ApiGen