Services/NavitiaTokenManager.php
private function getInstancesIdsFromExternalsCoveragesIds(\Traversable $perimeters)
    {
        $userPerimeterNavitiaIds = array();
        $instances = $this->getInstances();

        foreach ($perimeters as $perimeter) {
            $userPerimeterNavitiaId = array_search($perimeter->getExternalCoverageId(), $instances);
            if ($userPerimeterNavitiaId) {
                $userPerimeterNavitiaIds[] = array_search($perimeter->getExternalCoverageId(), $instances);
            } else {
                throw new NotFoundHttpException("Coverage not found: " . $perimeter->getExternalCoverageId() . " in tyr api (" . $this->tyrUrl . ") ");
            }
        }
        return $userPerimeterNavitiaIds;
    }
private function getInstancesIdsFromExternalsCoveragesIds(\Traversable $perimeters)
    {
        $userPerimeterNavitiaIds = array();
        $instances = $this->getInstances();

        foreach ($perimeters as $perimeter) {
            $userPerimeterNavitiaId = array_search($perimeter->getExternalCoverageId(), $instances);
            if ($userPerimeterNavitiaId) {
                $userPerimeterNavitiaIds[] = array_search($perimeter->getExternalCoverageId(), $instances);
            } else {
                throw new NotFoundHttpException("Coverage not found: " . $perimeter->getExternalCoverageId() . " in tyr api (" . $this->tyrUrl . ") ");
            }
        }
        return $userPerimeterNavitiaIds;
    }
private function getInstancesIdsFromExternalsCoveragesIds ( \ Traversable $ perimeters ) { $ userPerimeterNavitiaIds = array ( ) ; $ instances = $ this -> getInstances ( ) ; foreach ( $ perimeters as $ perimeter ) { $ userPerimeterNavitiaId = array_search ( $ perimeter -> getExternalCoverageId ( ) , $ instances ) ; if ( $ userPerimeterNavitiaId ) { $ userPerimeterNavitiaIds [ ] = array_search ( $ perimeter -> getExternalCoverageId ( ) , $ instances ) ; } else { throw new NotFoundHttpException ( "Coverage not found: " . $ perimeter -> getExternalCoverageId ( ) . " in tyr api (" . $ this -> tyrUrl . ") " ) ; } } return $ userPerimeterNavitiaIds ; }
From perimeters names, find navitia instances ids for add permissions

@param array $coverages
From perimeters names find navitia instances ids for add permissions