| @@ -142,5 +142,26 @@ | ||
| 142 | 142 | |
| 143 | 143 | return $data; |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | + /** | |
| 147 | + * Validates series tyeps. | |
| 148 | + * | |
| 149 | + * @since 1.0.1 | |
| 150 | + * | |
| 151 | + * @static | |
| 152 | + * @access protected | |
| 153 | + * @param array $types The icoming series types. | |
| 154 | + * @return boolean TRUE if sereis types are valid, otherwise FALSE. | |
| 155 | + */ | |
| 156 | + protected static function _validateTypes( $types ) { | |
| 157 | + $allowed_types = array( 'string', 'number', 'boolean', 'date', 'datetime', 'timeofday' ); | |
| 158 | + foreach ( $types as $type ) { | |
| 159 | + if ( !in_array( $type, $allowed_types ) ) { | |
| 160 | + return false; | |
| 161 | + } | |
| 162 | + } | |
| 163 | + | |
| 164 | + return true; | |
| 165 | + } | |
| 166 | + | |
| 146 | 167 | } |