/** * Get an instance of type \Colada\Europeana\Payload\PayloadHandlerInterface * * This factory method will create a handler object based on the type of the * PayloadInterface objec which is passed as a method argument. * * @param \Colada\Europeana\Payload\PayloadInterface $payload */ public static function getHandler(PayloadInterface $payload) { $handler = $payload->getHandlerClass(); return $handler::create($payload); }