PHP Classes


Recommend this page to a friend!
  Classes of Leonardo Mauro Pereira Moraes  >  FPHP Loader  >  >  Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: FPHP Loader
Load one or more PHP scripts from a directory
Author: By
Last change: update LICENSE
Date: 3 years ago
Size: 1,805 bytes


Class file image Download


Links: PHP Classes and Github

Class of autoload was based on PSR standards to import the classes. Split the main class FPHP_Loader in two: ClassLoader and FileLoader.


This class loader files from direct paths, or folder path. The class supports multiple file name extensions to check and defaults to .php . The script files can be loaded with either include or require.


  |__ autoload.php
  |__ /fphp/
  |     |__ /loader/
  |            |__ ClassLoader.php
  |            |__ FileLoader.php
  |            |__ ErrorParserLoader.php
  |__ /example/

  |__ index.file.loader.php [e.g. FileLoader]
  |__ index.class.loader.php [e.g. ClassLoader]

  • autoload.php: Config and active the class autoload [use ClassLoader];
  • ClassLoader.php: Loader of classes (php);
  • FileLoader.php: Loader of files (any type);
  • ErrorParserLoader.php: Error parser of FileLoader;


Example Autoload

Require autoload and call the classes

use \Example\SuperHero as IronMan;


Example FileLoader

Require autoload and call the classes

use \FPHP_Loader\FileLoader;

$ext = ['html', 'htm'];
$loader = new FileLoader();


Also look ~

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