You are here

private function AppCacheByOwner::getAppsByAppNames in Apigee Edge 8

Returns the apps from the app cache for the given owner and app names.

Parameters

array $names: Array of app names.

Return value

\Apigee\Edge\Api\Management\Entity\AppInterface[] Array of apps.

2 calls to AppCacheByOwner::getAppsByAppNames()
AppCacheByOwner::getAppIdsByAppNames in src/Entity/Controller/Cache/AppCacheByOwner.php
Returns the app ids from the app cache for the given owner and app names.
AppCacheByOwner::getEntities in src/Entity/Controller/Cache/AppCacheByOwner.php
Returns entities from the cache.

File

src/Entity/Controller/Cache/AppCacheByOwner.php, line 170

Class

AppCacheByOwner
Default cache store for apps of a specific owner.

Namespace

Drupal\apigee_edge\Entity\Controller\Cache

Code

private function getAppsByAppNames(array $names) : array {
  $apps = [];
  $apps_by_owner = $this->appCache
    ->getAppsByOwner($this->owner);

  // There is nothing to invalidate.
  if ($apps_by_owner === NULL) {
    return $apps;
  }
  return array_filter($apps_by_owner, function (AppInterface $app) use ($names) {
    return in_array($app
      ->getName(), $names);
  });
}