Login   Register  
PHP Classes
elePHPant
Icontem

File: TestNamespace/TestClass.nsim.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Martin Alterisio  >  NamespaceSim  >  TestNamespace/TestClass.nsim.php  >  Download  
File: TestNamespace/TestClass.nsim.php
Role: Example script
Content type: text/plain
Description: nsim'ed example class
Class: NamespaceSim
Emulate class namespaces under PHP 5
Author: By
Last change: Version 0.5.0
Date: 2007-08-01 22:00
Size: 549 bytes
 

Contents

Class file image Download
<?php
/**
 * @ignore
 * @package ignore
 */

package TestNamespace;
import TestNamespace2;

/**
 * @ignore
 */
class TestClass extends TestClass2 implements TestInterface {
    static 
$test "Hi!\n";
    const 
TEST_CONSTANT "This is a constant!\n";
    
    function 
__construct($test) {
        echo 
"$test\n";
    }
    
    static function 
testStatic($test) {
        
trigger_error('Ouch');
        echo 
"static: $test\n";
    }
    
    function 
test() {
        
$test = new TestClass2('Bye World!');
    }
}
?>