PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 2.8.23.5
Pods – Custom Content Types and Fields v2.8.23.5
2.7.31.4 2.8.23.5 2.9.19.5 3.0.10.5 3.1.4.3 3.2.8.4 3.3.9.2 2.8.23.4 2.9.19.4 3.0.10.4 3.1.4.2 3.2.8.3 3.3.9.1 trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 3.2.5 3.2.6 3.2.7 3.2.7.1 3.2.8 3.2.8.1 3.2.8.2 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9
pods / tribe-common / src / Tribe / Validator / Interface.php
pods / tribe-common / src / Tribe / Validator Last commit date
Base.php 1 week ago Interface.php 1 week ago
Interface.php
103 lines
1 <?php
2
3 /**
4 * Interface Tribe__Validator__Interface
5 *
6 * Models any class that provides methods to validate values.
7 */
8 interface Tribe__Validator__Interface {
9 /**
10 * @param mixed $value
11 *
12 * @return bool
13 */
14 public function is_numeric( $value );
15
16 /**
17 * @param mixed $value
18 *
19 * @return bool
20 */
21 public function is_string( $value );
22
23 /**
24 * Whether the value is a timestamp or a string parseable by the strtotime function or not.
25 *
26 * @param mixed $value
27 *
28 * @return bool
29 */
30 public function is_time( $value );
31
32 /**
33 * Whether the value corresponds to an existing user ID or not.
34 *
35 * @param mixed $value
36 *
37 * @return bool
38 */
39 public function is_user_id( $value );
40
41 /**
42 * Whether the value is a positive integer or not.
43 *
44 * @param mixed $value
45 *
46 * @return bool
47 */
48 public function is_positive_int( $value );
49
50 /**
51 * Trims a string.
52 *
53 * Differently from the trim method it will not use the second argument.
54 *
55 * @param string $value
56 *
57 * @return string
58 */
59 public function trim( $value );
60
61 /**
62 * Whether the value(s) all map to existing post tags.
63 *
64 * @param mixed $tag
65 *
66 * @return bool
67 */
68 public function is_post_tag( $tag );
69
70 /**
71 * Whether the term exists and is a term of the specified taxonomy.
72 *
73 * @param mixed $term Either a single term `term_id` or `slug` or an array of
74 * `term_id`s and `slug`s
75 * @param string $taxonomy
76 *
77 * @return bool
78 */
79 public function is_term_of_taxonomy( $term, $taxonomy );
80
81 /**
82 * Whether the provided value points to an existing attachment ID or an existing image URL.
83 *
84 * @param int|string $image
85 *
86 * @return mixed
87 */
88 public function is_image( $image );
89
90 /**
91 * Whether a list or array of only contains positive integers or not.
92 *
93 * @since 4.7.19
94 *
95 * @param string|array $list
96 * @param string $sep The separator used in the list to separate the elements; ignored if
97 * the input value is an array.
98 *
99 * @return bool
100 */
101 public function is_positive_int_list( $list, $sep = ',' );
102 }
103