Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Notice: include(): read of 3376 bytes failed with errno=12 Cannot allocate memory in /var/www/html/ticnews.com.br/web/wp-content/plugins/download-monitor/vendor/composer/ClassLoader.php on line 444
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/load.php on line 926
Notice: Trying to access array offset on value of type bool in /var/www/html/ticnews.com.br/web/wp-includes/theme.php on line 2360
Notice: Trying to access array offset on value of type bool in /var/www/html/ticnews.com.br/web/wp-content/plugins/download-monitor/src/DLM.php on line 236
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/formatting.php on line 4768
e
*/
protected function _valid_type( $name ) {
static $map = array(
'int' => 'intval',
'integer' => 'intval',
'float' => 'floatval',
'double' => 'floatval',
'real' => 'floatval',
'string' => 'strval',
'enum' => null,
);
if ( !isset( $map[$name] ) ) {
return false;
}
return $map[$name];
}
/**
* _sane_value method
*
* Parse single input value according to processing rules.
* Relies on {@see self::_type_cast()} for value conversion.
*
* @param mixed $input Original request value
* @param array $options Type definition options
*
* @return mixed Sanitized value
*/
protected function _sane_value( $input, array $options ) {
$sane_value = null;
if ( $options['is_list'] ) {
$value = explode( $options['list_sep'], $input );
$sane_value = array( );
foreach ( $value as $element ) {
$cast_element = $this->_type_cast( $element, $options );
if ( ! empty( $cast_element ) ) {
$sane_value[] = $cast_element;
}
}
} else {
$sane_value = $this->_type_cast( $input, $options );
}
return $sane_value;
}
/**
* _type_cast method
*
* Cast value to given type.
* Non-PHP type 'enum' is accepted
*
* @param mixed $value Value to cast
* @param array $options Type definition options
*
* @return mixed Casted value
*/
protected function _type_cast( $value, array $options ) {
if ( 'enum' === $options['type'] ) {
if ( in_array( $value, $options['list_sep'] ) ) {
return $value;
}
return null;
}
$cast = $this->_valid_type( $options['type'] );
$value = $cast( $value );
return $value;
}
}