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;
|
2011-01-31 01:17:06 +01:00
|
|
|
|
2010-12-07 14:37:07 +01:00
|
|
|
public static $defaultTemplates = array(
|
2011-02-08 23:10:58 +01:00
|
|
|
self::EQUALS => '%s must be equals %s',
|
|
|
|
self::IDENTICAL => '%s must be identical as %s',
|
2010-12-07 14:37:07 +01:00
|
|
|
);
|
|
|
|
|
2011-02-08 23:10:58 +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
|
|
|
}
|
|
|
|
|
|
|
|
}
|