You are here

class InvalidArgumentException in Zircon Profile 8

Same name in this branch
  1. 8 vendor/sebastian/recursion-context/src/InvalidArgumentException.php \SebastianBergmann\RecursionContext\InvalidArgumentException
  2. 8 vendor/symfony/process/Exception/InvalidArgumentException.php \Symfony\Component\Process\Exception\InvalidArgumentException
  3. 8 vendor/symfony/validator/Exception/InvalidArgumentException.php \Symfony\Component\Validator\Exception\InvalidArgumentException
  4. 8 vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
  5. 8 vendor/symfony/serializer/Exception/InvalidArgumentException.php \Symfony\Component\Serializer\Exception\InvalidArgumentException
  6. 8 vendor/zendframework/zend-feed/src/Exception/InvalidArgumentException.php \Zend\Feed\Exception\InvalidArgumentException
  7. 8 vendor/zendframework/zend-escaper/src/Exception/InvalidArgumentException.php \Zend\Escaper\Exception\InvalidArgumentException
  8. 8 vendor/zendframework/zend-stdlib/src/Exception/InvalidArgumentException.php \Zend\Stdlib\Exception\InvalidArgumentException
  9. 8 vendor/zendframework/zend-hydrator/src/Exception/InvalidArgumentException.php \Zend\Hydrator\Exception\InvalidArgumentException
  10. 8 vendor/psr/log/Psr/Log/InvalidArgumentException.php \Psr\Log\InvalidArgumentException
  11. 8 vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php \Prophecy\Exception\InvalidArgumentException
  12. 8 vendor/zendframework/zend-feed/src/PubSubHubbub/Exception/InvalidArgumentException.php \Zend\Feed\PubSubHubbub\Exception\InvalidArgumentException
  13. 8 vendor/zendframework/zend-feed/src/Reader/Exception/InvalidArgumentException.php \Zend\Feed\Reader\Exception\InvalidArgumentException
  14. 8 vendor/zendframework/zend-feed/src/Writer/Exception/InvalidArgumentException.php \Zend\Feed\Writer\Exception\InvalidArgumentException
  15. 8 vendor/zendframework/zend-hydrator/src/Strategy/Exception/InvalidArgumentException.php \Zend\Hydrator\Strategy\Exception\InvalidArgumentException
  16. 8 vendor/zendframework/zend-stdlib/src/Hydrator/Strategy/Exception/InvalidArgumentException.php \Zend\Stdlib\Hydrator\Strategy\Exception\InvalidArgumentException
  17. 8 vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php \Doctrine\Instantiator\Exception\InvalidArgumentException
  18. 8 vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php \Doctrine\Common\Proxy\Exception\InvalidArgumentException
Same name and namespace in other branches
  1. 8.0 vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php \Doctrine\Instantiator\Exception\InvalidArgumentException

Exception for invalid arguments provided to the instantiator

@author Marco Pivetta <ocramius@gmail.com>

Hierarchy

Expanded class hierarchy of InvalidArgumentException

3 files declare their use of InvalidArgumentException
Generator.php in vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php
Instantiator.php in vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php
InvalidArgumentExceptionTest.php in vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php
37 string references to 'InvalidArgumentException'
AbstractOperationTest::testGetMessagesFromUnknownDomain in vendor/symfony/translation/Tests/Catalogue/AbstractOperationTest.php
ApplicationTest::testFindWithAmbiguousAbbreviations in vendor/symfony/console/Tests/ApplicationTest.php
@dataProvider provideAmbiguousAbbreviations
ArrayInputTest::testParseInvalidInput in vendor/symfony/console/Tests/Input/ArrayInputTest.php
@dataProvider provideInvalidInput
BuilderTest::pushShouldThrowOnInvalidInput in vendor/stack/builder/tests/unit/Stack/BuilderTest.php
@test
BuilderTest::unshiftShouldThrowOnInvalidInput in vendor/stack/builder/tests/unit/Stack/BuilderTest.php
@test

... See full list

File

vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php, line 30

Namespace

Doctrine\Instantiator\Exception
View source
class InvalidArgumentException extends BaseInvalidArgumentException implements ExceptionInterface {

  /**
   * @param string $className
   *
   * @return self
   */
  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));
  }

  /**
   * @param ReflectionClass $reflectionClass
   *
   * @return self
   */
  public static function fromAbstractClass(ReflectionClass $reflectionClass) {
    return new self(sprintf('The provided class "%s" is abstract, and can not be instantiated', $reflectionClass
      ->getName()));
  }

}

Members