<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title> Bugzilla::WebService::Util</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" title="style" type="text/css" href="../.././../../../style.css" media="all" > </head> <body id="pod"> <p class="backlinktop"><b><a name="___top" href="../../index.html" accesskey="1" title="All Documents"><<</a></b></p> <h1></h1> <div class='indexgroup'> <ul class='indexList indexList1'> <li class='indexItem indexItem1'><a href='#NAME'>NAME</a> <li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a> <li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a> <li class='indexItem indexItem1'><a href='#METHODS'>METHODS</a> </ul> </div> <h1><a class='u' href='#___top' title='click to go to top of document' name="NAME" >NAME</a></h1> <p>Bugzilla::WebService::Util - Utility functions used inside of the WebService code. These are <b>not</b> functions that can be called via the WebService.</p> <h1><a class='u' href='#___top' title='click to go to top of document' name="DESCRIPTION" >DESCRIPTION</a></h1> <p>This is somewhat like <a href="../../Bugzilla/Util.html" class="podlinkpod" >Bugzilla::Util</a>, but these functions are only used internally in the WebService code.</p> <h1><a class='u' href='#___top' title='click to go to top of document' name="SYNOPSIS" >SYNOPSIS</a></h1> <pre class="code"> filter({ include_fields => ['id', 'name'], exclude_fields => ['name'] }, $hash); validate(@_, 'ids');</pre> <h1><a class='u' href='#___top' title='click to go to top of document' name="METHODS" >METHODS</a></h1> <dl> <dt><a name="filter_fields" ><code class="code">filter_fields</code></a></dt> <dd> <p>This helps implement the <code class="code">include_fields</code> and <code class="code">exclude_fields</code> arguments of WebService methods. Given a hash (the second argument to this subroutine), this will remove any keys that are <i>not</i> in <code class="code">include_fields</code> and then remove any keys that <i>are</i> in <code class="code">exclude_fields</code>.</p> <dt><a name="validate" ><code class="code">validate</code></a></dt> <dd> <p>This helps in the validation of parameters passed into the WebSerice methods. Currently it converts listed parameters into an array reference if the client only passed a single scalar value. It modifies the parameters hash in place so other parameters should be unaltered.</p> </dd> </dl> <p class="backlinkbottom"><b><a name="___bottom" href="../../index.html" title="All Documents"><<</a></b></p> <!-- end doc --> </body></html>