PHP Classes

File: example/index.class.loader.php

Recommend this page to a friend!
  Classes of Leonardo Mauro Pereira Moraes   FPHP Loader   example/index.class.loader.php   Download  
File: example/index.class.loader.php
Role: Example script
Content type: text/plain
Description: Example script
Class: FPHP Loader
Load one or more PHP scripts from a directory
Author: By
Last change:
Date: 7 years ago
Size: 486 bytes
 

Contents

Class file image Download
<?php

/**
* Example: Include autoload and call the classes/methods
*/
require('../dist/php/autoload.php');

/* Call the class `SuperHero` and say you are `IronMan` */
use \Example\SuperHero as IronMan;
/* use \Example\SuperHero; <= or just call and use class real name `SuperHero` */

use \Villain\Bob; /* Example with namespace `Villain` setted, see `autoload.php` */

/* Using the classes */
Bob::says();
IronMan::says();
/* SuperHero::says() <= without change the class name */

?>