Skip to content

Latest commit

 

History

History
57 lines (32 loc) · 1.92 KB

File metadata and controls

57 lines (32 loc) · 1.92 KB
layout title
doc
Autoload - Codeception - Documentation

Codeception\Util\Autoload

Autoloader, which is fully compatible with PSR-4, and can be used to autoload your Helper, Page, and Step classes.

public static addNamespace($prefix, $base_dir, $prepend = null)

Adds a base directory for a namespace prefix.

Example:

{% highlight php %}

{% endhighlight %}

  • param string $prefix The namespace prefix.
  • param string $base_dir A base directory for class files in the namespace.
  • param bool $prepend If true, prepend the base directory to the stack instead of appending it; this causes it to be searched first rather than last.
  • return void

See source

public static load($class)

See source

public static register($namespace, $suffix, $path)

  • deprecated Use self::addNamespace() instead.

See source

public static registerSuffix($suffix, $path)

  • deprecated Use self::addNamespace() instead.

See source

 

Reference is taken from the source code. Help us to improve documentation. Edit module reference