PHP Classes
elePHPant
Icontem

File: test/folder/runtest2.php

Recommend this page to a friend!
  Classes of Jorge Castro  >  PHP AutoLoad One  >  test/folder/runtest2.php  >  Download  
File: test/folder/runtest2.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP AutoLoad One
Generate scripts to autoload classes of a project
Author: By
Last change:
Date: 8 months ago
Size: 698 bytes
 

Contents

Class file image Download
<?php

define
("_AUTOLOADONEDEBUG",true);
include
"..\autoinclude.php";



// basic
$c2=new \folder\NaturalClass();
// same folders
$c1=new \folder\subfolder\AnotherNaturalClass();
$c3=new \folder\subfolder\AnotherNaturalClass2();
$c4=new \folder\subfolder\MoreNaturalClass();
// same folder, again
$c4=new \folder\subfolder\MoreNaturalClass();
// same namespace, different folder
$c5=new \folder\subfolder\CustomClass();

// one file, two namespaces
$c6=new \MyProject\Connection();
$c8=new \AnotherProject\Connection();

// class without namespace
$c9=new ClassWithoutNameSpace();



echo
"Ok<br>";

echo
"the next command should raise an error:<br>";
$cE1 = new \folder\subfolder\CustomClassE();