respect-validation/library/Respect/Validation/Exceptions/CallbackException.php
2010-10-18 06:18:46 -02:00

27 lines
No EOL
682 B
PHP

<?php
namespace Respect\Validation\Exceptions;
use Exception;
class CallbackException extends InvalidException
{
const MSG_CALLBACK = 'Callback_1';
protected $messageTemplates = array(
self::MSG_CALLBACK => '%s does not validate against the provided callback %s.'
);
public function __construct($input, $callback)
{
parent::__construct(
$this->getMessageTemplate(
sprintf(
self::MSG_CALLBACK,
$this->getStringRepresentation($input),
$this->getStringRepresentation($callback)
)
)
);
}
}