ValidatorInterface.php
692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php 
namespace Phalcon\Validation {
	/**
	 * Phalcon\Validation\ValidatorInterface initializer
	 */
	
	interface ValidatorInterface {
		/**
		 * Checks if an option is defined
		 *
		 * @param string $key
		 * @return mixed
		 */
		public function isSetOption($key);
		/**
		 * Returns an option in the validator's options
		 * Returns null if the option hasn't been set
		 *
		 * @param string $key
		 * @return mixed
		 */
		public function getOption($key);
		/**
		 * Executes the validation
		 *
		 * @param \Phalcon\Validator $validator
		 * @param string $attribute
		 * @return \Phalcon\Validation\Message\Group
		 */
		public function validate($validator, $attribute);
	}
}