PHP Classes

PHP Autoloader Class: Load classes automatically from a given directory

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: 211 All time: 8,356 This week: 206Up
Version License PHP version Categories
php-autoloader-class 1.0.1MIT/X Consortium ...5PHP 5, Language, PHP 7
Description 

Author

This package can load classes automatically from a given directory.

It can register a given directory to make PHP load classes from files that exist in a given directory.

The loader provides a static function to make it easy to load classes with a single line of code to configure the auto-loader.

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq is available for providing paid consulting. Contact Muhammad Umer Farooq .
Classes: 52 packages by
Country: Pakistan Pakistan
Age: 23
All time rank: 84310 in Pakistan Pakistan
Week rank: 164 Up4 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 6x

Example

<?php

require_once 'core/init.php';

//loading Classes filess
Autoloader::Load('include/classes');

echo
Hello::hello();

echo
'<br>';

echo
Hello::hello2();

echo
'<br>';

$B = new B();

$c = new php\C();

$d = new php\dynamic\D();

$e = new php\dynamic\core\hack\E();


Details

PHP Simple Autoloader class

This package can auto load classes form path that provided.

Feature

1. Autloading the classes 2. Autoloading classes with namespace

Description

This package can auto load classes form path that provided.

Simple Example

for more detail see index.php


//require the files
require_once 'core/init.php';
//loading classes
Autoloader::Load('path/to/files');


  Files folder image Files (11)  
File Role Description
Files folder imagecore (1 file, 1 directory)
Files folder imageinclude (1 directory)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Readme.md Doc. Documentation

  Files folder image Files (11)  /  core  
File Role Description
Files folder imageclasses (1 file)
  Accessible without login Plain text file init.php Aux. Auxiliary script

  Files folder image Files (11)  /  core  /  classes  
File Role Description
  Plain text file Autoloader.php Class Class source

  Files folder image Files (11)  /  include  
File Role Description
Files folder imageclasses (3 files, 1 directory)

  Files folder image Files (11)  /  include  /  classes  
File Role Description
Files folder imagephp (1 file, 1 directory)
  Plain text file A.php Class Class source
  Plain text file B.php Class Class source
  Plain text file Hello.php Class Class source

  Files folder image Files (11)  /  include  /  classes  /  php  
File Role Description
Files folder imagedynamic (1 file, 1 directory)
  Plain text file C.php Class Class source

  Files folder image Files (11)  /  include  /  classes  /  php  /  dynamic  
File Role Description
Files folder imagecore (1 directory)
  Plain text file D.php Class Class source

  Files folder image Files (11)  /  include  /  classes  /  php  /  dynamic  /  core  
File Role Description
Files folder imagehack (1 file)

  Files folder image Files (11)  /  include  /  classes  /  php  /  dynamic  /  core  /  hack  
File Role Description
  Plain text file E.php Class Class source

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
 Version Control Unique User Downloads Download Rankings  
 100%
Total:211
This week:0
All time:8,356
This week:206Up