PHP Classes

File: TestNamespace/TestClass.nsim.php

Recommend this page to a friend!
  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: 16 years ago
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!');
    }
}
?>