public static function getInstance($config = null)
    {
        static $instance;

        $instance = $instance ? clone $instance : new self();

        if (!$config) {
            $config = new AnConfig();
        }

        $config->append(array(
            'date' => gmdate('Y-m-d H:i:s'),
        ));

        $instance->setDate($config->date);

        return $instance;
    }
public static function getInstance($config = null)
    {
        static $instance;

        $instance = $instance ? clone $instance : new self();

        if (!$config) {
            $config = new AnConfig();
        }

        $config->append(array(
            'date' => gmdate('Y-m-d H:i:s'),
        ));

        $instance->setDate($config->date);

        return $instance;
    }
public static function getInstance ( $ config = null ) { static $ instance ; $ instance = $ instance ? clone $ instance : new self ( ) ; if ( ! $ config ) { $ config = new AnConfig ( ) ; } $ config -> append ( array ( 'date' => gmdate ( 'Y-m-d H:i:s' ) , ) ) ; $ instance -> setDate ( $ config -> date ) ; return $ instance ; }
Factory Method.

@param 	object 	An optional AnConfig object with configuration options
Factory Method .