respect-validation/library/Respect/Validation/Exceptions/EqualsException.php

20 lines
450 B
PHP
Raw Normal View History

2010-12-07 14:37:07 +01:00
<?php
namespace Respect\Validation\Exceptions;
class EqualsException extends ValidationException
{
2011-02-07 02:12:41 +01:00
const EQUALS = 0;
const IDENTICAL = 0;
2010-12-07 14:37:07 +01:00
public static $defaultTemplates = array(
self::EQUALS => '%s must be equals %s',
self::IDENTICAL => '%s must be identical as %s',
2010-12-07 14:37:07 +01:00
);
public function chooseTemplate($name, $equals, $identical)
2010-12-07 14:37:07 +01:00
{
2011-02-07 02:12:41 +01:00
return ($identical) ? static::IDENTICAL : static::EQUALS;
2010-12-07 14:37:07 +01:00
}
}