/** * @param string $methodName * @param array $args */ public function __call($methodName, array $args) { if (isset(static::$entityClassNames[$methodName])) { $className = static::$entityClassNames[$methodName]; $repository = EntityHelper::getRepository($className); $entities = array(); $ids = $args[0]; foreach ($ids as $id) { $id = EntityHelper::parseCombinedId($className, $id); $entities[] = $repository->find($id); } return $entities; } throw new \RuntimeException('No save options resolver class found for ' . $methodName); }