/** * A static singleton method to obtain an instance of this class, while * ensuring that only ONE instance of the class ever exists for a single * PHP script execution. */ static function singleton() { if (!isset(self::$oAPI)) { self::$oAPI = new Services_AMEE_API(); } return self::$oAPI; }