public static function getApplications(Annotation $annotation) { $object = $annotation->getObject(); $apps = []; foreach ($object->get('app,application') as $app) { $apps[] = strtolower(trim(current($app->getArgs()) ?: '')); } if ($object instanceof ZMethod) { foreach ($object->getClass()->get('app,application') as $app) { $apps[] = strtolower(trim(current($app->getArgs()) ?: '')); } } return array_unique(array_filter($apps)) ?: ['default']; }