PHP Interface Xpressengine\Routing\RouteRepository

Author: XE Developers ([email protected])
Exibir arquivo Open project: xpressengine/xpressengine Interface Usage Examples

Public Methods

Method Description
all ( ) : InstanceRoute[] Returns all route items
create ( array $input ) : InstanceRoute Save a new route item and return the instance
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
put ( InstanceRoute $route ) : InstanceRoute Save the route item

Method Details

all() public method

Returns all route items
public all ( ) : InstanceRoute[]
return InstanceRoute[]

create() public method

Save a new route item and return the instance
public create ( array $input ) : InstanceRoute
$input array route item attributes
return InstanceRoute

delete() public method

Delete the route item from the repository
public delete ( InstanceRoute $route ) : boolean | null
$route InstanceRoute route instance
return boolean | null

fetchByModule() public method

Retrieve routes by module name
public fetchByModule ( string $module ) : InstanceRoute[]
$module string module name
return InstanceRoute[]

fetchBySiteKey() public method

Retrieve routes by site key
public fetchBySiteKey ( string $siteKey ) : InstanceRoute[]
$siteKey string site key
return InstanceRoute[]

findByInstanceId() public method

Retrieve a route by instance identifier
public findByInstanceId ( string $instanceId ) : InstanceRoute
$instanceId string instance identifier
return InstanceRoute

findByUrlAndSiteKey() public method

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
return InstanceRoute

put() public method

Save the route item
public put ( InstanceRoute $route ) : InstanceRoute
$route InstanceRoute route instance
return InstanceRoute