public static function addHeader($type, $value, $code = null) {

		if(false == is_string($type)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($type)), E_USER_ERROR);
		}

		if(false == is_string($value) && false == is_numeric($value)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($value)), E_USER_ERROR);
		}

		if(null !== $code && false === ('-' . intval($code) == '-' . $code)) {
			return trigger_error(sprintf('Argument 3 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($code)), E_USER_ERROR);
		}

		if(null === $code) {
			return header($type . ':' . $value, true);
		}

		header($type . ':' . $value, true, $code);
	}
public static function addHeader($type, $value, $code = null) {

		if(false == is_string($type)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($type)), E_USER_ERROR);
		}

		if(false == is_string($value) && false == is_numeric($value)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($value)), E_USER_ERROR);
		}

		if(null !== $code && false === ('-' . intval($code) == '-' . $code)) {
			return trigger_error(sprintf('Argument 3 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($code)), E_USER_ERROR);
		}

		if(null === $code) {
			return header($type . ':' . $value, true);
		}

		header($type . ':' . $value, true, $code);
	}
public static function addHeader ( $ type , $ value , $ code = null ) { if ( false == is_string ( $ type ) ) { return trigger_error ( sprintf ( 'Argument 1 passed to %s() must be of the type string, "%s" given' , __METHOD__ , gettype ( $ type ) ) , E_USER_ERROR ) ; } if ( false == is_string ( $ value ) && false == is_numeric ( $ value ) ) { return trigger_error ( sprintf ( 'Argument 2 passed to %s() must be of the type string, "%s" given' , __METHOD__ , gettype ( $ value ) ) , E_USER_ERROR ) ; } if ( null !== $ code && false === ( '-' . intval ( $ code ) == '-' . $ code ) ) { return trigger_error ( sprintf ( 'Argument 3 passed to %s() must be of the type integer, "%s" given' , __METHOD__ , gettype ( $ code ) ) , E_USER_ERROR ) ; } if ( null === $ code ) { return header ( $ type . ':' . $ value , true ) ; } header ( $ type . ':' . $ value , true , $ code ) ; }
Sets the response header by type and value
@param string $type
@param string $value
Sets the response header by type and value