Flugg\Responder\ResourceFactory::getMakeMethod PHP Méthode

getMakeMethod() protected méthode

Resolve which make method to call from the given date type.
protected getMakeMethod ( mixed $data ) : string
$data mixed
Résultat string
    protected function getMakeMethod($data) : string
    {
        foreach (static::MAKE_METHODS as $class => $method) {
            if ($data instanceof $class) {
                return $method;
            }
        }
        throw new InvalidArgumentException('Given data cannot be transformed.');
    }