src/ADT/JSON/Builder.php
private static function getType( $key, $value )
	{
		if( is_object( $value ))
			$type	= 'object';
		elseif( is_array( $value ) )
			$type	= self::isAssoc( $value ) ? 'object' : 'array';
		elseif( is_int( $value ) || is_float( $value ) || is_double( $value ) )
			$type	= 'number';
		elseif( is_string( $value ) )
			$type	= 'string';
		elseif( is_bool( $value ) )
			$type	= 'boolean';
		elseif( is_null( $value ) )
			$type	= 'null';
		else
			throw new InvalidArgumentException( 'Variable "'.$key.'" is not a supported Type.' );
		return $type;
	}
private static function getType( $key, $value )
	{
		if( is_object( $value ))
			$type	= 'object';
		elseif( is_array( $value ) )
			$type	= self::isAssoc( $value ) ? 'object' : 'array';
		elseif( is_int( $value ) || is_float( $value ) || is_double( $value ) )
			$type	= 'number';
		elseif( is_string( $value ) )
			$type	= 'string';
		elseif( is_bool( $value ) )
			$type	= 'boolean';
		elseif( is_null( $value ) )
			$type	= 'null';
		else
			throw new InvalidArgumentException( 'Variable "'.$key.'" is not a supported Type.' );
		return $type;
	}
private static function getType ( $ key , $ value ) { if ( is_object ( $ value ) ) $ type = 'object' ; elseif ( is_array ( $ value ) ) $ type = self :: isAssoc ( $ value ) ? 'object' : 'array' ; elseif ( is_int ( $ value ) || is_float ( $ value ) || is_double ( $ value ) ) $ type = 'number' ; elseif ( is_string ( $ value ) ) $ type = 'string' ; elseif ( is_bool ( $ value ) ) $ type = 'boolean' ; elseif ( is_null ( $ value ) ) $ type = 'null' ; else throw new InvalidArgumentException ( 'Variable "' . $ key . '" is not a supported Type.' ) ; return $ type ; }
Returns Data Type of Pair Value.
@access		private
@static
@param		string		$key			Key of Pair
@param		mixed		$value			Value of Pair
@return		string
Returns Data Type of Pair Value .