PHP Class Keevitaja\Linguist\Services\Linguist

显示文件 Open project: keevitaja/linguist

Protected Properties

Property Type Description
$url object Url Generator

Public Methods

Method Description
__construct ( UrlGenerator $url )
defaultLocale ( ) : string Get default locale
isHidden ( string $slug ) : boolean Is locale slug hidden
route ( string $name, array $parameters = [], array $extra = [], mixed $secure = null, mixed $slug = false ) : string Generate localized URL from named route
uri ( string $uri, mixed $slug = false ) : string Generate localized URI
url ( string $uri, array $extra = [], mixed $secure = null, mixed $slug = false ) : string Generate localized URL from URI
workingLocale ( ) : string Get working locale or default on fail

Protected Methods

Method Description
validatedSlug ( string $slug ) : string Get validated i18n slug

Method Details

__construct() public method

public __construct ( UrlGenerator $url )
$url Illuminate\Routing\UrlGenerator

defaultLocale() public method

Get default locale
public defaultLocale ( ) : string
return string

isHidden() public method

Is locale slug hidden
public isHidden ( string $slug ) : boolean
$slug string
return boolean

route() public method

Generate localized URL from named route
public route ( string $name, array $parameters = [], array $extra = [], mixed $secure = null, mixed $slug = false ) : string
$name string
$parameters array
$extra array
$secure mixed
$slug mixed
return string

uri() public method

Generate localized URI
public uri ( string $uri, mixed $slug = false ) : string
$uri string
$slug mixed
return string

url() public method

Generate localized URL from URI
public url ( string $uri, array $extra = [], mixed $secure = null, mixed $slug = false ) : string
$uri string
$extra array
$secure mixed
$slug mixed
return string

validatedSlug() protected method

Get validated i18n slug
protected validatedSlug ( string $slug ) : string
$slug string
return string

workingLocale() public method

Get working locale or default on fail
public workingLocale ( ) : string
return string

Property Details

$url protected_oe property

Url Generator
protected object $url
return object