public static function InvalidArgumentException::fromNonExistingClass in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php \Doctrine\Instantiator\Exception\InvalidArgumentException::fromNonExistingClass()
Parameters
string $className:
Return value
self
4 calls to InvalidArgumentException::fromNonExistingClass()
- Instantiator::getReflectionClass in vendor/
doctrine/ instantiator/ src/ Doctrine/ Instantiator/ Instantiator.php - InvalidArgumentExceptionTest::testFromNonExistingTypeWithInterface in vendor/
doctrine/ instantiator/ tests/ DoctrineTest/ InstantiatorTest/ Exception/ InvalidArgumentExceptionTest.php - InvalidArgumentExceptionTest::testFromNonExistingTypeWithNonExistingClass in vendor/
doctrine/ instantiator/ tests/ DoctrineTest/ InstantiatorTest/ Exception/ InvalidArgumentExceptionTest.php - InvalidArgumentExceptionTest::testFromNonExistingTypeWithTrait in vendor/
doctrine/ instantiator/ tests/ DoctrineTest/ InstantiatorTest/ Exception/ InvalidArgumentExceptionTest.php
File
- vendor/
doctrine/ instantiator/ src/ Doctrine/ Instantiator/ Exception/ InvalidArgumentException.php, line 37
Class
- InvalidArgumentException
- Exception for invalid arguments provided to the instantiator
Namespace
Doctrine\Instantiator\ExceptionCode
public static function fromNonExistingClass($className) {
if (interface_exists($className)) {
return new self(sprintf('The provided type "%s" is an interface, and can not be instantiated', $className));
}
if (PHP_VERSION_ID >= 50400 && trait_exists($className)) {
return new self(sprintf('The provided type "%s" is a trait, and can not be instantiated', $className));
}
return new self(sprintf('The provided class "%s" does not exist', $className));
}