public static function path($segment = false) { if (self::$_path === false) { $i = self::$_last_bu_url_instance; self::$_path = $i->getPath(); } if ($segment === false) { return self::$_path; } if (!array_key_exists($segment, self::$_path)) { throw new Exception('Сегмент ' . $segment . ' отсутствует в' . ' списке пути.'); } return self::$_path[$segment]; }