PHP Class Xpressengine\Routing\Repositories\DatabaseRouteRepository

Author: XE Developers ([email protected])
Inheritance: implements Xpressengine\Routing\RouteRepository
Afficher le fichier Open project: xpressengine/xpressengine

Méthodes publiques

Свойство Type Description
$protectedUrl array Protected keyword for url first segment

Protected Properties

Свойство Type Description
$configs Illuminate\Contracts\Config\Repository Laravel config instance
$model string The route model

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
validateUrl ( string $siteKey, string $url, boolean $isNew ) : boolean Check validate given url

Method Details

__construct() public méthode

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() public méthode

Returns all route items
public all ( ) : InstanceRoute[]
Résultat Xpressengine\Routing\InstanceRoute[]

create() public méthode

Save a new route item and return the instance
public create ( array $input ) : InstanceRoute
$input array route item attributes
Résultat Xpressengine\Routing\InstanceRoute

createModel() public méthode

Create a new instance of the model.
public createModel ( ) : Model
Résultat Illuminate\Database\Eloquent\Model

delete() public méthode

Delete the route item from the repository
public delete ( InstanceRoute $route ) : boolean | null
$route Xpressengine\Routing\InstanceRoute route instance
Résultat boolean | null

fetchByModule() public méthode

Retrieve routes by module name
public fetchByModule ( string $module ) : InstanceRoute[]
$module string module name
Résultat Xpressengine\Routing\InstanceRoute[]

fetchBySiteKey() public méthode

Retrieve routes by site key
public fetchBySiteKey ( string $siteKey ) : InstanceRoute[]
$siteKey string site key
Résultat Xpressengine\Routing\InstanceRoute[]

findByInstanceId() public méthode

Retrieve a route by instance identifier
public findByInstanceId ( string $instanceId ) : InstanceRoute
$instanceId string instance identifier
Résultat Xpressengine\Routing\InstanceRoute

findByUrlAndSiteKey() public méthode

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
Résultat Xpressengine\Routing\InstanceRoute

getModel() public méthode

Gets the name of the Eloquent user model.
public getModel ( ) : string
Résultat string

put() public méthode

Save the route item
public put ( InstanceRoute $route ) : InstanceRoute
$route Xpressengine\Routing\InstanceRoute route instance
Résultat Xpressengine\Routing\InstanceRoute

setModel() public méthode

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

validateUrl() protected méthode

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
Résultat boolean

Property Details

$configs protected_oe property

Laravel config instance
protected Repository,Illuminate\Contracts\Config $configs
Résultat Illuminate\Contracts\Config\Repository

$model protected_oe property

The route model
protected string $model
Résultat string

$protectedUrl public_oe property

Protected keyword for url first segment
public array $protectedUrl
Résultat array