PHP Classes

Flexible AutoLoader: Autoloader that supports PSR-0 and other methods

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 212 All time: 8,343 This week: 49Up
Version License PHP version Categories
falcraftloader 1.0MIT/X Consortium ...5.3PHP 5, Language
Description 

Author

This package is implements an autoloader that supports PSR-0 and other methods.

It registers an autoloader that can load classes associating module names or namespaces with specific directory paths.

The autoloader supports multiple directories per module, as well customizable class file name suffixes and prefixes.

Picture of Asher Wolfstein
  Performance   Level  
Name: Asher Wolfstein <contact>
Classes: 15 packages by
Country: United States United States
Age: 41
All time rank: 1121164 in United States United States
Week rank: 178 Up22 in United States United States Up
Innovation award
Innovation award
Nominee: 5x

Example

<?php

require_once('../../Loader/AutoLoader.php');
require_once(
'../../Resource/FileUtility.php');

use
Falcraft\Loader;
use
Falcraft\Resource;

echo
"Falcraft\\Data\\Loader\\AutoLoader.php Test\n";
echo
"------------------------------------------\n\n";

$autoLoader = new Loader\AutoLoader(array(), array('AutoRegister' => true));

use
Falcraft\tests\Loader\TestLoads;

$testObject = new TestLoads\TestClass();

var_dump($testObject);

echo
"\n";

$path = realpath(Resource\FileUtility::normalizePath('../../../AutoLoaderTest/'));

$autoLoader->addPath($path, 'AutoLoaderTest');

use
AutoLoaderTest\FirstNamespace;

$testObject2 = new FirstNamespace\TestClass();

var_dump($testObject2);

echo
"\n";

$autoLoader->removePath($path);

$autoLoader->addLibraryModule('AutoLoader', $path, null);

use
AutoLoaderTest\SecondNamespace;

$testObject3 = new SecondNamespace\TestClass();

var_dump($testObject3);

echo
"\n";



  Files folder image Files (17)  
File Role Description
Files folder imageAutoLoaderTest (2 directories)
Files folder imageFalcraft (4 directories)

  Files folder image Files (17)  /  AutoLoaderTest  
File Role Description
Files folder imageFirstNamespace (1 file)
Files folder imageSecondNamespace (1 file)

  Files folder image Files (17)  /  AutoLoaderTest  /  FirstNamespace  
File Role Description
  Plain text file TestClass.php Class Test Class for AutoLoading

  Files folder image Files (17)  /  AutoLoaderTest  /  SecondNamespace  
File Role Description
  Plain text file TestClass.php Class Test Class for AutoLoading

  Files folder image Files (17)  /  Falcraft  
File Role Description
Files folder imageData (1 directory)
Files folder imageLoader (2 files, 1 directory)
Files folder imageResource (1 file)
Files folder imagetests (1 directory)

  Files folder image Files (17)  /  Falcraft  /  Data  
File Role Description
Files folder imageComponents (2 directories)

  Files folder image Files (17)  /  Falcraft  /  Data  /  Components  
File Role Description
Files folder imageException (2 files)
Files folder imageFile (2 files, 1 directory)

  Files folder image Files (17)  /  Falcraft  /  Data  /  Components  /  Exception  
File Role Description
  Plain text file ExceptionInterface.php Class Local Exception Interface
  Plain text file InvalidArgumentException.php Class Local Invalid Argument Exception

  Files folder image Files (17)  /  Falcraft  /  Data  /  Components  /  File  
File Role Description
Files folder imageResource (2 files)
  Plain text file Folder.php Class Folder Class
  Plain text file Path.php Class Path Class

  Files folder image Files (17)  /  Falcraft  /  Data  /  Components  /  File  /  Resource  
File Role Description
  Plain text file AbstractFolder.php Class Abstract Folder Class
  Plain text file FolderInterface.php Class Folder Interface

  Files folder image Files (17)  /  Falcraft  /  Loader  
File Role Description
Files folder imageResource (3 files)
  Plain text file AutoLoader.php Class AutoLoader Implementation
  Plain text file Module.php Class The Module Class

  Files folder image Files (17)  /  Falcraft  /  Loader  /  Resource  
File Role Description
  Plain text file AbstractLoader.php Class Loader Abstraction
  Plain text file GenericLoaderInterface.php Class Generic Loader Interface
  Plain text file ModuleInterface.php Class Interface for Loader Modules

  Files folder image Files (17)  /  Falcraft  /  Resource  
File Role Description
  Accessible without login Plain text file FileUtility.php Appl. File / Path Utility Functions

  Files folder image Files (17)  /  Falcraft  /  tests  
File Role Description
Files folder imageLoader (2 files, 1 directory)

  Files folder image Files (17)  /  Falcraft  /  tests  /  Loader  
File Role Description
Files folder imageTestLoads (1 file)
  Accessible without login Plain text file AutoLoader.php Example AutoLoader Test Script
  Accessible without login Plain text file Module.php Example Module Test Script

  Files folder image Files (17)  /  Falcraft  /  tests  /  Loader  /  TestLoads  
File Role Description
  Plain text file TestClass.php Class Test Class for AutoLoading

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
Downloadfalcraftloader-2015-10-21.zip 30KB
Downloadfalcraftloader-2015-10-21.tar.gz 21KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
PHP Configuration Trait Download .zip .tar.gz Abstract Loader Uses For Configuration Required
Abstract Data Types Download .zip .tar.gz Data Types Support Folder Components Required
 Version Control Unique User Downloads Download Rankings  
 0%
Total:212
This week:0
All time:8,343
This week:49Up