mirror of
https://github.com/Respect/Validation.git
synced 2026-03-16 15:25:45 +01:00
Most changes was made by php-cs-fixer. Also removes unused `RecursiveTreeIterator` class.
22 lines
459 B
PHP
22 lines
459 B
PHP
<?php
|
|
namespace Respect\Validation\Rules;
|
|
|
|
class Instance extends AbstractRule
|
|
{
|
|
public $instanceName;
|
|
|
|
public function __construct($instanceName)
|
|
{
|
|
$this->instanceName = $instanceName;
|
|
}
|
|
|
|
public function reportError($input, array $extraParams = array())
|
|
{
|
|
return parent::reportError($input, $extraParams);
|
|
}
|
|
|
|
public function validate($input)
|
|
{
|
|
return $input instanceof $this->instanceName;
|
|
}
|
|
}
|