public static function setCurrent($object=null,$persistent=true) { if ($object===null) { self::$currentInstance=null; if ($persistent) unset($_SESSION['LPC']['current_project_id']); return null; } self::$currentInstance=$object; if ($persistent) $_SESSION['LPC']['current_project_id']=$object->id; return true; }