|
1 | 1 | <?php |
2 | 2 | namespace Neuron\Mvc\Requests; |
3 | 3 | use Neuron\Log\Log; |
4 | | -use Neuron\Validation\ArrayData; |
5 | | -use Neuron\Validation\Boolean; |
6 | | -use Neuron\Validation\Currency; |
7 | | -use Neuron\Validation\Date; |
8 | | -use Neuron\Validation\DateTime; |
9 | | -use Neuron\Validation\Ein; |
10 | | -use Neuron\Validation\Email; |
11 | | -use Neuron\Validation\FloatingPoint; |
12 | | -use Neuron\Validation\Integer; |
13 | | -use Neuron\Validation\IPAddress; |
14 | | -use Neuron\Validation\Name; |
15 | | -use Neuron\Validation\Numeric; |
16 | | -use Neuron\Validation\ObjectData; |
17 | | -use Neuron\Validation\PhoneNumber; |
18 | | -use Neuron\Validation\StringData; |
19 | | -use Neuron\Validation\Time; |
20 | | -use Neuron\Validation\Upc; |
21 | | -use Neuron\Validation\Url; |
| 4 | +use Neuron\Validation\IsArray; |
| 5 | +use Neuron\Validation\IsBoolean; |
| 6 | +use Neuron\Validation\IsCurrency; |
| 7 | +use Neuron\Validation\IsDate; |
| 8 | +use Neuron\Validation\IsDateTime; |
| 9 | +use Neuron\Validation\IsEin; |
| 10 | +use Neuron\Validation\IsEmail; |
| 11 | +use Neuron\Validation\IsFloatingPoint; |
| 12 | +use Neuron\Validation\IsInteger; |
| 13 | +use Neuron\Validation\IsName; |
| 14 | +use Neuron\Validation\IsObject; |
| 15 | +use Neuron\Validation\IsPhoneNumber; |
| 16 | +use Neuron\Validation\IsString; |
| 17 | +use Neuron\Validation\IsUpc; |
| 18 | +use Neuron\Validation\IsUrl; |
| 19 | +use Neuron\Validation\IsUuid; |
22 | 20 |
|
23 | 21 | class Parameter |
24 | 22 | { |
@@ -47,28 +45,29 @@ public function __construct() |
47 | 45 | $this->_MaxValue = 0; |
48 | 46 | $this->_Pattern = ''; |
49 | 47 |
|
50 | | - $IntlPhoneNumber = new PhoneNumber(); |
51 | | - $IntlPhoneNumber->setType( PhoneNumber::INTERNATIONAL ); |
| 48 | + $IntlPhoneNumber = new IsPhoneNumber(); |
| 49 | + $IntlPhoneNumber->setType( IsPhoneNumber::INTERNATIONAL ); |
52 | 50 |
|
53 | 51 | $this->_Validators = [ |
54 | | - 'array' => new ArrayData(), |
55 | | - 'boolean' => new Boolean(), |
56 | | - 'currency' => new Currency(), |
57 | | - 'date' => new Date(), |
58 | | - 'date_time' => new DateTime(), |
59 | | - 'ein' => new Ein(), |
60 | | - 'email' => new Email(), |
61 | | - 'float' => new FloatingPoint(), |
62 | | - 'integer' => new Integer(), |
63 | | - 'ip_address' => new IPAddress(), |
64 | | - 'name' => new Name(), |
65 | | - 'numeric' => new Numeric(), |
66 | | - 'object' => new ObjectData(), |
67 | | - 'string' => new StringData(), |
68 | | - 'time' => new Time(), |
69 | | - 'upc' => new Upc(), |
70 | | - 'url' => new Url(), |
71 | | - 'us_phone_number' => new PhoneNumber(), |
| 52 | + 'array' => new IsArray(), |
| 53 | + 'boolean' => new IsBoolean(), |
| 54 | + 'currency' => new IsCurrency(), |
| 55 | + 'date' => new IsDate(), |
| 56 | + 'date_time' => new IsDateTime(), |
| 57 | + 'ein' => new IsEin(), |
| 58 | + 'email' => new IsEmail(), |
| 59 | + 'float' => new IsFloatingPoint(), |
| 60 | + 'integer' => new IsInteger(), |
| 61 | + 'ip_address' => new IsInteger(), |
| 62 | + 'name' => new IsName(), |
| 63 | + 'numeric' => new IsPhoneNumber(), |
| 64 | + 'object' => new IsObject(), |
| 65 | + 'string' => new IsString(), |
| 66 | + 'time' => new IsDateTime(), |
| 67 | + 'upc' => new IsUpc(), |
| 68 | + 'uuid' => new IsUuid(), |
| 69 | + 'url' => new IsUrl(), |
| 70 | + 'us_phone_number' => new IsPhoneNumber(), |
72 | 71 | 'intl_phone_number' => $IntlPhoneNumber |
73 | 72 | ]; |
74 | 73 | } |
|
0 commit comments