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,359 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 <contact>
Classes: 52 packages by
Country: Pakistan Pakistan
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

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,359
This week:206Up