respect-validation/library/Exceptions/NotEmptyException.php
Henrique Moody da193b75e0 Use PSR-2 standard
Most changes was made by php-cs-fixer.
Also removes unused `RecursiveTreeIterator` class.
2015-01-08 00:44:12 -02:00

23 lines
650 B
PHP

<?php
namespace Respect\Validation\Exceptions;
class NotEmptyException extends ValidationException
{
const STANDARD = 0;
const NAMED = 1;
public static $defaultTemplates = array(
self::MODE_DEFAULT => array(
self::STANDARD => 'The value must not be empty',
self::NAMED => '{{name}} must not be empty',
),
self::MODE_NEGATIVE => array(
self::STANDARD => 'The value must be empty',
self::NAMED => '{{name}} must be empty',
),
);
public function chooseTemplate()
{
return $this->getName() == "" ? static::STANDARD : static::NAMED;
}
}