/** * Setter/Getter for an instance of self * * @param Utility_Files $instance * @return Utility_Files * @throws Exception when there is no instance set */ public static function init(Utility_Files $instance = null) { if ($instance) { self::$_instance = $instance; } if (!self::$_instance) { throw new Exception('Instance is not set yet.'); } return self::$_instance; }