PHP Classes

File: samples/default.php

Recommend this page to a friend!
  Classes of adriano ghezzi   ghz PHP Autoloader   samples/default.php   Download  
File: samples/default.php
Role: Example script
Content type: text/plain
Description: sample using default implementation
Class: ghz PHP Autoloader
Autoload classes scanning files in directories
Author: By
Last change:
Date: 5 years ago
Size: 608 bytes
 

Contents

Class file image Download
<?php
require_once "../ghzAutoloader.php";
$extrapaths=[ __DIR__ . DIRECTORY_SEPARATOR.'myPckg' .DIRECTORY_SEPARATOR];
ghzAutoloader::defaultImplementation($extrapaths);

/*if you are running under windos you can uncomemnt the lines below
/but if you are running under linux the only class that can be autoloaded with default implementation
is lib\the_only_one();
cause other namespaces will be converted to lower case and can't match the path under linux
*/
//$h=new \myPckg\Helpers\helperOne();
//$one=new \myPckg\Core\classOne();
//$t=new \myPckg\Core\test_linux_class();
$unique=new lib\the_only_one();