Skip to content

Commit

Permalink
Remove deprecated method createInstance().
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Apr 29, 2020
1 parent 677ed92 commit 78234d4
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/ApiManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,28 +258,6 @@ private function route(string $route, array $params): array
}


/**
* Create new API endpoint instance with all injected dependencies.
*
* @param string $class
* @param mixed[] $params
* @return Endpoint
*/
private function createInstance(string $class, array $params): Endpoint
{
/** @var Endpoint $endpoint */
$endpoint = $this->container->getByType($class);

foreach (InjectExtension::getInjectProperties(\get_class($endpoint)) as $property => $service) {
$endpoint->{$property} = $this->container->getByType($service);
}

$endpoint->setData($params);

return $endpoint;
}


/**
* Call all endpoint methods in regular order and return response state.
*
Expand Down

0 comments on commit 78234d4

Please sign in to comment.