Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/recipe-fiddle.git
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Recipe Fiddle: com\whitemagicsoftware\Recipe Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Recipe Fiddle
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>com</b>      </li>
      <li class="navelem"><b>whitemagicsoftware</b>      </li>
      <li class="navelem"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html">Recipe</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">com\whitemagicsoftware\Recipe Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="com::whitemagicsoftware::Recipe" --><!-- doxytag: inherits="com::whitemagicsoftware::BaseController" -->
<p>Provides recipe editing and viewing functionality.  
 <a href="classcom_1_1whitemagicsoftware_1_1Recipe.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for com\whitemagicsoftware\Recipe:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classcom_1_1whitemagicsoftware_1_1Recipe.png" usemap="#com\whitemagicsoftware\Recipe_map" alt=""/>
  <map id="com\whitemagicsoftware\Recipe_map" name="com\whitemagicsoftware\Recipe_map">
<area href="classcom_1_1whitemagicsoftware_1_1BaseController.html" title="Used by all subclasses that interact with the end user." alt="com\whitemagicsoftware\BaseController" shape="rect" coords="0,56,237,80"/>
<area href="classcom_1_1whitemagicsoftware_1_1Obj.html" title="Superclass that abstracts the common functionality." alt="com\whitemagicsoftware\Obj" shape="rect" coords="0,0,237,24"/>
</map>
 </div></div>

<p><a href="classcom_1_1whitemagicsoftware_1_1Recipe-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a502f8faf8633e8470dccb7d54f10b5ec"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::__construct" ref="a502f8faf8633e8470dccb7d54f10b5ec" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a502f8faf8633e8470dccb7d54f10b5ec">__construct</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the connection that this class uses for database transactions. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a815a0d7b2537e46b90fbc8b98dfaab3a">parseInstructionText</a> ($text)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a line of text, this invokes the Natural Language Parser to return a JSON-encoded result.  <a href="#a815a0d7b2537e46b90fbc8b98dfaab3a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a7552388c43c1fb4e96236b08d849324a">parseIngredientText</a> ($text)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls the Natural Language Processor to decipher the given text.  <a href="#a7552388c43c1fb4e96236b08d849324a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#aa74721f33567c4be10b5146ebe08c9a4">extractIngredientName</a> ($decoded, $extraTags=false)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The first noun is the ingredient.  <a href="#aa74721f33567c4be10b5146ebe08c9a4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#ae404c14203b2005d70a5e145f845e106">extractIngredientMeasures</a> ($decoded, $default_min=1)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the minimum and maximum measurements for the ingredient.  <a href="#ae404c14203b2005d70a5e145f845e106"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#acc3935b90841683394c87515902187dd">extractIngredientUnit</a> ($decoded)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts the first unit detected and returns it.  <a href="#acc3935b90841683394c87515902187dd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#ab947ea3b38063688c7ccd640c25011e3">extractIngredientCondition</a> ($decoded)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts all of the verbs.  <a href="#ab947ea3b38063688c7ccd640c25011e3"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a4c428b4b663ee0ee6562dbce75ef95ba">exists</a> ($id)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks to see if the given recipe ID exists.  <a href="#a4c428b4b663ee0ee6562dbce75ef95ba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a7053417a40f53906cf0d89acd00b8a32">getLastResortId</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the most recently added recipe ID for the given authentication token.  <a href="#a7053417a40f53906cf0d89acd00b8a32"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a82f917adb933d38e9790eaeb9e8c5693">getParameterIdName</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the parameter used to obtain the identifier for the object to edit.  <a href="#a82f917adb933d38e9790eaeb9e8c5693"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#ab6fa180ff8d4eea783973d7b5727f297">getStylesheetName</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the stylesheet to use for transforming the recipe from XML to XHTML.  <a href="#ab6fa180ff8d4eea783973d7b5727f297"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0bca0f0091b83dd82c0eb4d44965f0ba"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::getAuthorizationFunctionName" ref="a0bca0f0091b83dd82c0eb4d44965f0ba" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a0bca0f0091b83dd82c0eb4d44965f0ba">getAuthorizationFunctionName</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the function that can be called to determine whether the user can perform edits on a given object. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abf3e3ed59826ec6e10d7c5df415524ab"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::getXhtml" ref="abf3e3ed59826ec6e10d7c5df415524ab" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#abf3e3ed59826ec6e10d7c5df415524ab">getXhtml</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a recipe in XHTML format. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a9781d18c71ab7113cbdd2ff80faa04f7">handleRequest</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Handles the HTTP request for interacting with a recipe.  <a href="#a9781d18c71ab7113cbdd2ff80faa04f7"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Provides recipe editing and viewing functionality. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a4c428b4b663ee0ee6562dbce75ef95ba"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::exists" ref="a4c428b4b663ee0ee6562dbce75ef95ba" args="($id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">com\whitemagicsoftware\<a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a4c428b4b663ee0ee6562dbce75ef95ba">Recipe::exists</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Checks to see if the given recipe ID exists. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">$id</td><td>A recipe ID to find. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the given recipe ID has data. </dd></dl>

<p>Reimplemented from <a class="el" href="classcom_1_1whitemagicsoftware_1_1BaseController.html#a651ebed023e094bd53ca4ea5a9a554ba">com\whitemagicsoftware\BaseController</a>.</p>

</div>
</div>
<a class="anchor" id="ab947ea3b38063688c7ccd640c25011e3"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::extractIngredientCondition" ref="ab947ea3b38063688c7ccd640c25011e3" args="($decoded)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">com\whitemagicsoftware\<a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#ab947ea3b38063688c7ccd640c25011e3">Recipe::extractIngredientCondition</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>decoded</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Extracts all of the verbs. </p>
<p>This will return null if there are no verbs found. </p>

</div>
</div>
<a class="anchor" id="ae404c14203b2005d70a5e145f845e106"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::extractIngredientMeasures" ref="ae404c14203b2005d70a5e145f845e106" args="($decoded, $default_min=1)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">com\whitemagicsoftware\<a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#ae404c14203b2005d70a5e145f845e106">Recipe::extractIngredientMeasures</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>decoded</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>default_min</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Finds the minimum and maximum measurements for the ingredient. </p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000007">Todo:</a></b></dt><dd>: Detect items like "1 16-oz can beans". </dd></dl>

</div>
</div>
<a class="anchor" id="aa74721f33567c4be10b5146ebe08c9a4"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::extractIngredientName" ref="aa74721f33567c4be10b5146ebe08c9a4" args="($decoded, $extraTags=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">com\whitemagicsoftware\<a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#aa74721f33567c4be10b5146ebe08c9a4">Recipe::extractIngredientName</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>decoded</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>extraTags</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The first noun is the ingredient. </p>
<p>This will remove the underscores (if present) that were injected by the NLP.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">$decoded</td><td>The decoded JSON string as an array. </td></tr>
    <tr><td class="paramname">$extraTags</td><td>Whether to include other tags when considering ingredient name extraction. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="acc3935b90841683394c87515902187dd"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::extractIngredientUnit" ref="acc3935b90841683394c87515902187dd" args="($decoded)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">com\whitemagicsoftware\<a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#acc3935b90841683394c87515902187dd">Recipe::extractIngredientUnit</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>decoded</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Extracts the first unit detected and returns it. </p>
<p>This will return null if no unit of measurement could be found. </p>

</div>
</div>
<a class="anchor" id="a7053417a40f53906cf0d89acd00b8a32"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::getLastResortId" ref="a7053417a40f53906cf0d89acd00b8a32" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">com\whitemagicsoftware\<a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a7053417a40f53906cf0d89acd00b8a32">Recipe::getLastResortId</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the most recently added recipe ID for the given authentication token. </p>
<p>This is called by the superclass when the ID could not be determined through POST, GET, or URL. It is the last resort for obtaining a valid ID.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if no ID can be found. </dd></dl>

<p>Reimplemented from <a class="el" href="classcom_1_1whitemagicsoftware_1_1BaseController.html#a7736b4d09221ab5d861a3ee37352d2fe">com\whitemagicsoftware\BaseController</a>.</p>

</div>
</div>
<a class="anchor" id="a82f917adb933d38e9790eaeb9e8c5693"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::getParameterIdName" ref="a82f917adb933d38e9790eaeb9e8c5693" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">com\whitemagicsoftware\<a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a82f917adb933d38e9790eaeb9e8c5693">Recipe::getParameterIdName</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the name of the parameter used to obtain the identifier for the object to edit. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>"recipe-id" </dd></dl>

<p>Reimplemented from <a class="el" href="classcom_1_1whitemagicsoftware_1_1BaseController.html#a23ab3f53a3f9413c51751a9cec74f7b5">com\whitemagicsoftware\BaseController</a>.</p>

</div>
</div>
<a class="anchor" id="ab6fa180ff8d4eea783973d7b5727f297"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::getStylesheetName" ref="ab6fa180ff8d4eea783973d7b5727f297" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">com\whitemagicsoftware\<a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#ab6fa180ff8d4eea783973d7b5727f297">Recipe::getStylesheetName</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the name of the stylesheet to use for transforming the recipe from XML to XHTML. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>"xsl/recipe.xsl" </dd></dl>

</div>
</div>
<a class="anchor" id="a9781d18c71ab7113cbdd2ff80faa04f7"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::handleRequest" ref="a9781d18c71ab7113cbdd2ff80faa04f7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">com\whitemagicsoftware\<a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a9781d18c71ab7113cbdd2ff80faa04f7">Recipe::handleRequest</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Handles the HTTP request for interacting with a recipe. </p>
<p>This method can be simplified to eliminate the if conditionals:</p>
<pre>
 $controller-&gt;{ $method.$command }($request);
 $view-&gt;{ $command }();
 $view-&gt;respond();
 </pre><dl class="todo"><dt><b><a class="el" href="todo.html#_todo000008">Todo:</a></b></dt><dd>Execute the command structure using a more elegant design. </dd></dl>

<p>Reimplemented from <a class="el" href="classcom_1_1whitemagicsoftware_1_1BaseController.html#abe2ef8cbe87586419389efc7cbc747fd">com\whitemagicsoftware\BaseController</a>.</p>

</div>
</div>
<a class="anchor" id="a7552388c43c1fb4e96236b08d849324a"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::parseIngredientText" ref="a7552388c43c1fb4e96236b08d849324a" args="($text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">com\whitemagicsoftware\<a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a7552388c43c1fb4e96236b08d849324a">Recipe::parseIngredientText</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>text</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Calls the Natural Language Processor to decipher the given text. </p>
<p>The results from this method can be passed to the ingredient extract methods.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">$text</td><td>The text to tag.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A JSON-encoded list of words, tagged as parts of speech. </dd></dl>

</div>
</div>
<a class="anchor" id="a815a0d7b2537e46b90fbc8b98dfaab3a"></a><!-- doxytag: member="com::whitemagicsoftware::Recipe::parseInstructionText" ref="a815a0d7b2537e46b90fbc8b98dfaab3a" args="($text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">com\whitemagicsoftware\<a class="el" href="classcom_1_1whitemagicsoftware_1_1Recipe.html#a815a0d7b2537e46b90fbc8b98dfaab3a">Recipe::parseInstructionText</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>text</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Given a line of text, this invokes the Natural Language Parser to return a JSON-encoded result. </p>
<p>The decoded JSON results can be passed into the instruction processor.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>A JSON-encoded string. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>class.Recipe.php</li>
</ul>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Tue Jul 30 2013 22:06:29 for Recipe Fiddle by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>