Overview

Namespaces

  • DcGeneral
    • Clipboard
    • Contao
      • Callback
      • Compatibility
      • DataDefinition
        • Definition
      • Dca
        • Builder
          • Legacy
        • Definition
        • Palette
        • Populator
      • Event
      • View
        • Contao2BackendView
          • Event
    • Controller
    • Data
    • DataDefinition
      • Builder
      • Definition
        • Properties
        • View
          • Panel
      • ModelRelationship
      • Palette
        • Builder
          • Event
        • Condition
          • Palette
          • Property
    • EnvironmentPopulator
    • Event
    • Exception
    • Factory
      • Event
    • Panel
    • View
      • Event

Classes

  • ActiveRecord
  • ClassLoader
  • DcCompat
  • TemplateLoader
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Class ClassLoader

Class ClassLoader

This class simply exists to provide the Contao 3 namespace based auto loading in Contao 2.11. It is heavily based upon code by Leo Feyer and only temporary.

Namespace: DcGeneral\Contao\Compatibility
Package: DcGeneral\Contao\Compatibility
Located at Contao/Compatibility/ClassLoader.php
Methods summary
public static
# addNamespace( string $name )

Add a new namespace.

Add a new namespace.

Parameters

$name
string
$name The namespace name.
public static
# addNamespaces( array $names )

Add multiple new namespaces.

Add multiple new namespaces.

Parameters

$names
array
$names An array of namespace names.
public static array
# getNamespaces( )

Return the namespaces as array.

Return the namespaces as array.

Returns

array
An array of all namespaces.
public static
# addClass( string $class, string $file )

Add a new class with its file path.

Add a new class with its file path.

Parameters

$class
string
$class The class name.
$file
string
$file The path to the class file.
public static
# addClasses( array $classes )

Add multiple new classes with their file paths.

Add multiple new classes with their file paths.

Parameters

$classes
array
$classes An array of classes.
public static array
# getClasses( )

Return the classes as array.

Return the classes as array.

Returns

array
An array of all classes.
public static
# load( string $class )

Autoload a class and create an alias in the global namespace.

Autoload a class and create an alias in the global namespace.

To preserve backwards compatibility with Contao 2 extensions, all core classes will be aliased into the global namespace.

Parameters

$class
string
$class The class name.
protected static string
# findClass( string $class )

Search the namespaces for a matching entry.

Search the namespaces for a matching entry.

Parameters

$class
string
$class The class name.

Returns

string
The full path including the namespace.
public static
# register( )

Register the auto loader.

Register the auto loader.

public static
# scanAndRegister( )

Dummy method.

Dummy method.

Properties summary
protected static array $namespaces array ( 'Contao' )
#

Known namespaces.

Known namespaces.

protected static array $classes array()
#

Known classes.

Known classes.

contao-community-alliance/dc-general API documentation generated by ApiGen 2.8.0