Xpressengine\Routing\RouteRepository::fetchBySiteKey PHP Method

fetchBySiteKey() public method

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

Usage Example

 /**
  * Retrieve routes by site key
  *
  * @param string $siteKey site key
  * @return InstanceRoute[]
  */
 public function fetchBySiteKey($siteKey)
 {
     if (!isset($this->mapBySiteKey[$siteKey])) {
         $routes = $this->repo->fetchBySiteKey($siteKey);
         foreach ($routes as $route) {
             $this->setToMap($route);
         }
     }
     return $this->mapBySiteKey[$siteKey];
 }
All Usage Examples Of Xpressengine\Routing\RouteRepository::fetchBySiteKey