PHP Classes

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

Recommend this page to a friend!
  Info   View files Example   View files View files (17)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 211 This week: 1All time: 8,349 This week: 571Up
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: 40
All time rank: 1122164 in United States United States
Week rank: 50 Up7 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  
File Role Description
Files folder imageAutoLoaderTest (2 directories)
Files folder imageFalcraft (4 directories)

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

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

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

  Files folder image Files  /  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  /  Falcraft  /  Data  
File Role Description
Files folder imageComponents (2 directories)

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

  Files folder image Files  /  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  /  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  /  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  /  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  /  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  /  Falcraft  /  Resource  
File Role Description
  Accessible without login Plain text file FileUtility.php Appl. File / Path Utility Functions

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

  Files folder image Files  /  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  /  Falcraft  /  tests  /  Loader  /  TestLoads  
File Role Description
  Plain text file TestClass.php Class Test Class for AutoLoading

Downloadfalcraftloader-2015-10-21.zip 30KB
Downloadfalcraftloader-2015-10-21.tar.gz
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:211
This week:1
All time:8,349
This week:571Up