PHP Класс Xpressengine\Routing\Repositories\DatabaseRouteRepository

Автор: XE Developers ([email protected])
Наследование: implements Xpressengine\Routing\RouteRepository
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$protectedUrl array Protected keyword for url first segment

Защищенные свойства (Protected)

Свойство Тип Описание
$configs Illuminate\Contracts\Config\Repository Laravel config instance
$model string The route model

Открытые методы

Метод Описание
__construct ( Illuminate\Contracts\Config\Repository $configs, string $model ) DatabaseRouteRepository constructor.
all ( ) : InstanceRoute[] Returns all route items
create ( array $input ) : InstanceRoute Save a new route item and return the instance
createModel ( ) : Model Create a new instance of the model.
delete ( InstanceRoute $route ) : boolean | null Delete the route item from the repository
fetchByModule ( string $module ) : InstanceRoute[] Retrieve routes by module name
fetchBySiteKey ( string $siteKey ) : InstanceRoute[] Retrieve routes by site key
findByInstanceId ( string $instanceId ) : InstanceRoute Retrieve a route by instance identifier
findByUrlAndSiteKey ( string $url, string $siteKey ) : InstanceRoute Retrieve a route by url segment and site key
getModel ( ) : string Gets the name of the Eloquent user model.
put ( InstanceRoute $route ) : InstanceRoute Save the route item
setModel ( string $model ) Sets the name of the Eloquent user model.

Защищенные методы

Метод Описание
validateUrl ( string $siteKey, string $url, boolean $isNew ) : boolean Check validate given url

Описание методов

__construct() публичный Метод

DatabaseRouteRepository constructor.
public __construct ( Illuminate\Contracts\Config\Repository $configs, string $model )
$configs Illuminate\Contracts\Config\Repository Laravel config instance
$model string The route model

all() публичный Метод

Returns all route items
public all ( ) : InstanceRoute[]
Результат Xpressengine\Routing\InstanceRoute[]

create() публичный Метод

Save a new route item and return the instance
public create ( array $input ) : InstanceRoute
$input array route item attributes
Результат Xpressengine\Routing\InstanceRoute

createModel() публичный Метод

Create a new instance of the model.
public createModel ( ) : Model
Результат Illuminate\Database\Eloquent\Model

delete() публичный Метод

Delete the route item from the repository
public delete ( InstanceRoute $route ) : boolean | null
$route Xpressengine\Routing\InstanceRoute route instance
Результат boolean | null

fetchByModule() публичный Метод

Retrieve routes by module name
public fetchByModule ( string $module ) : InstanceRoute[]
$module string module name
Результат Xpressengine\Routing\InstanceRoute[]

fetchBySiteKey() публичный Метод

Retrieve routes by site key
public fetchBySiteKey ( string $siteKey ) : InstanceRoute[]
$siteKey string site key
Результат Xpressengine\Routing\InstanceRoute[]

findByInstanceId() публичный Метод

Retrieve a route by instance identifier
public findByInstanceId ( string $instanceId ) : InstanceRoute
$instanceId string instance identifier
Результат Xpressengine\Routing\InstanceRoute

findByUrlAndSiteKey() публичный Метод

Retrieve a route by url segment and site key
public findByUrlAndSiteKey ( string $url, string $siteKey ) : InstanceRoute
$url string first segment of url
$siteKey string site key
Результат Xpressengine\Routing\InstanceRoute

getModel() публичный Метод

Gets the name of the Eloquent user model.
public getModel ( ) : string
Результат string

put() публичный Метод

Save the route item
public put ( InstanceRoute $route ) : InstanceRoute
$route Xpressengine\Routing\InstanceRoute route instance
Результат Xpressengine\Routing\InstanceRoute

setModel() публичный Метод

Sets the name of the Eloquent user model.
public setModel ( string $model )
$model string model class

validateUrl() защищенный Метод

Check validate given url
protected validateUrl ( string $siteKey, string $url, boolean $isNew ) : boolean
$siteKey string site key
$url string first segment of url
$isNew boolean if create new route then given true
Результат boolean

Описание свойств

$configs защищенное свойство

Laravel config instance
protected Repository,Illuminate\Contracts\Config $configs
Результат Illuminate\Contracts\Config\Repository

$model защищенное свойство

The route model
protected string $model
Результат string

$protectedUrl публичное свойство

Protected keyword for url first segment
public array $protectedUrl
Результат array