You are here

private function Instantiator::getReflectionClass in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php \Doctrine\Instantiator\Instantiator::getReflectionClass()

Parameters

string $className:

Return value

ReflectionClass

Throws

InvalidArgumentException

1 call to Instantiator::getReflectionClass()
Instantiator::buildFactory in vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php
Builds a {invoking its constructor.

File

vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php, line 129

Class

Instantiator
@author Marco Pivetta <ocramius@gmail.com>

Namespace

Doctrine\Instantiator

Code

private function getReflectionClass($className) {
  if (!class_exists($className)) {
    throw InvalidArgumentException::fromNonExistingClass($className);
  }
  $reflection = new ReflectionClass($className);
  if ($reflection
    ->isAbstract()) {
    throw InvalidArgumentException::fromAbstractClass($reflection);
  }
  return $reflection;
}