/** * 获取Router实例 * @return object Router实例 */ public static function getInstance() { if (empty(self::$instance)) { self::$instance = new self(); } return self::$instance; }
private static function getInstance() { if (is_null(self::$instance)) { self::$instance = new self(); } return self::$instance; }