PHP 클래스 Xpressengine\Routing\Repositories\CacheDecorator

저자: XE Developers ([email protected])
상속: implements Xpressengine\Routing\RouteRepository
파일 보기 프로젝트 열기: xpressengine/xpressengine

보호된 프로퍼티들

프로퍼티 타입 설명
$cache Xpressengine\Support\CacheInterface Cache instance
$prefix string Prefix for cache key
$repo Xpressengine\Routing\RouteRepository Repository instance

공개 메소드들

메소드 설명
__construct ( Xpressengine\Routing\RouteRepository $repo, Xpressengine\Support\CacheInterface $cache ) CacheDecorator constructor.
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 | null Retrieve a route by instance identifier
findByUrlAndSiteKey ( string $url, string $siteKey ) : InstanceRoute | null Retrieve a route by url segment and site key
put ( InstanceRoute $route ) : InstanceRoute Save the route item

보호된 메소드들

메소드 설명
cachingItem ( InstanceRoute $route ) : void Do caching a route item
getCacheKey ( string $keyword ) : string String for cache key

메소드 상세

__construct() 공개 메소드

CacheDecorator constructor.
public __construct ( Xpressengine\Routing\RouteRepository $repo, Xpressengine\Support\CacheInterface $cache )
$repo Xpressengine\Routing\RouteRepository Repository instance
$cache Xpressengine\Support\CacheInterface Cache instance

all() 공개 메소드

Returns all route items
public all ( ) : InstanceRoute[]
리턴 Xpressengine\Routing\InstanceRoute[]

cachingItem() 보호된 메소드

Do caching a route item
protected cachingItem ( InstanceRoute $route ) : void
$route Xpressengine\Routing\InstanceRoute route instance
리턴 void

create() 공개 메소드

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

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 | null
$instanceId string instance identifier
리턴 Xpressengine\Routing\InstanceRoute | null

findByUrlAndSiteKey() 공개 메소드

Retrieve a route by url segment and site key
public findByUrlAndSiteKey ( string $url, string $siteKey ) : InstanceRoute | null
$url string first segment of url
$siteKey string site key
리턴 Xpressengine\Routing\InstanceRoute | null

getCacheKey() 보호된 메소드

String for cache key
protected getCacheKey ( string $keyword ) : string
$keyword string keyword
리턴 string

put() 공개 메소드

Save the route item
public put ( InstanceRoute $route ) : InstanceRoute
$route Xpressengine\Routing\InstanceRoute route instance
리턴 Xpressengine\Routing\InstanceRoute

프로퍼티 상세

$cache 보호되어 있는 프로퍼티

Cache instance
protected CacheInterface,Xpressengine\Support $cache
리턴 Xpressengine\Support\CacheInterface

$prefix 보호되어 있는 프로퍼티

Prefix for cache key
protected string $prefix
리턴 string

$repo 보호되어 있는 프로퍼티

Repository instance
protected RouteRepository,Xpressengine\Routing $repo
리턴 Xpressengine\Routing\RouteRepository