Overview

Namespaces

  • Genetsis
    • core
      • activityid
      • user
  • None

Classes

  • ActivityApi
  • AutoloaderClass
  • Config
  • Identity
  • URLBuilder
  • UserApi
  • Overview
  • Namespace
  • Class

Class AutoloaderClass

Genetsis ID library Autoload Class

Namespace: Genetsis
Package: Genetsis
Copyright: Copyright (c) 2014 Genetsis
Version: 2.0
Located at Autoloader.php
Methods summary
public static
# init( )

Set namespace to autoload class

Set namespace to autoload class

public static
# addNamespace( string $prefix, string $base_dir, boolean $prepend = false )

Adds a base directory for a namespace prefix.

Adds a base directory for a namespace prefix.

Parameters

$prefix
The namespace prefix.
$base_dir

A base directory for class files in the namespace.

$prepend

If true, prepend the base directory to the stack instead of appending it; this causes it to be searched first rather than last.

protected static boolean
# requireFile( string $file )

If a file exists, require it from the file system.

If a file exists, require it from the file system.

Parameters

$file
The file to require.

Returns

boolean
True if the file exists, false if not.
public static
# register( )

Register loader with SPL autoloader stack.

Register loader with SPL autoloader stack.

public static mixed
# loadClass( string $class )

Loads the class file for a given class name.

Loads the class file for a given class name.

Parameters

$class
The fully-qualified class name.

Returns

mixed

The mapped file name on success, or boolean false on failure.

protected static mixed
# loadMappedFile( string $prefix, string $relative_class )

Load the mapped file for a namespace prefix and relative class.

Load the mapped file for a namespace prefix and relative class.

Parameters

$prefix
The namespace prefix.
$relative_class
The relative class name.

Returns

mixed

Boolean false if no mapped file can be loaded, or the name of the mapped file that was loaded.

Properties summary
protected static array $prefixes

An associative array where the key is a namespace prefix and the value is an array of base directories for classes in that namespace.

An associative array where the key is a namespace prefix and the value is an array of base directories for classes in that namespace.

# array()
API documentation generated by ApiGen