PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Sebastian Potasiak   Multi Singleton   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Multi Singleton
Implementation of the singleton design pattern
Author: By
Last change: Code correction. Version 1.0.1.
Date: 14 years ago
Size: 469 bytes
 

Contents

Class file image Download
<?php
    
/**
     * Example script
     * Example of using Singleton class
     *
     * @version: 1.0.1
     * @author: Sebastian Potasiak
     * @update: 2009-12-10
     * @license: GNU/GPL
     */
    
    
function __autoload($class)
     {
          if (!
class_exists($class) || !interface_exists($class))
               include(
"{$class}.php");
     }
    
    
$obj = MyClass::getInstance();
   
    
$obj->sayHello();
?>