File: example.php

Recommend this page to a friend!
  Classes of Till Wehowski  >  frdl Autoloader  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: frdl Autoloader
Autoload classes with PSR-0, PSR-4, mapping, etc.
Author: By
Last change:
Date: 5 years ago
Size: 562 bytes
 

Contents

Class file image Download
<?php
/**
 * SourceLoader example usage
 */

require 'SourceLoader.php';

frdl\webfan\Autoloading\SourceLoader::top()
   ->
addPsr4('frdl\\', DIRECTORY_SEPARATOR . 'pathToDir' . DIRECTORY_SEPARATOR, true)
   ->
addPsr0('aNamespace\\', DIRECTORY_SEPARATOR . 'pathToDir-Old' . DIRECTORY_SEPARATOR, false)
   ->
class_mapping_add('MyClass', DIRECTORY_SEPARATOR . 'pathToDir' . DIRECTORY_SEPARATOR .'cl.MyClass.php', $success)
   ->
autoload_register()
   ->
unregister(array(frdl\webfan\Autoloading\SourceLoader::top(),'autoloadClassFromServer'))
;


For more information send a message to info at phpclasses dot org.