Nelmio\Alice\Throwable\Exception\ParameterNotFoundExceptionFactory::create PHP 메소드

create() 공개 정적인 메소드

public static create ( string $key ) : ParameterNotFoundException
$key string
리턴 ParameterNotFoundException
    public static function create(string $key) : ParameterNotFoundException
    {
        return new ParameterNotFoundException(sprintf('Could not find the parameter "%s".', $key));
    }

Usage Example

 public function testTestCreateNewExceptionWithFactory()
 {
     $exception = ParameterNotFoundExceptionFactory::create('foo');
     $this->assertEquals('Could not find the parameter "foo".', $exception->getMessage());
     $this->assertEquals(0, $exception->getCode());
     $this->assertNull($exception->getPrevious());
 }
All Usage Examples Of Nelmio\Alice\Throwable\Exception\ParameterNotFoundExceptionFactory::create
ParameterNotFoundExceptionFactory