Location: PHPKode > projects > PHP on Trax > johnpipi-trax-f599562/trax/doc/PHPonTrax/Inflector.html
<html>
<head>
<title>Docs For Class Inflector</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">PHPonTrax</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_PHPonTrax.html" class="menu">class tree: PHPonTrax</a> ]
		  [ <a href="../elementindex_PHPonTrax.html" class="menu">index: PHPonTrax</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
      <b>Packages:</b><br />
              <a href="../li_PHPonTrax.html">PHPonTrax</a><br />
              <a href="../li_PHPonTraxTest.html">PHPonTraxTest</a><br />
            <br /><br />
		<b>Tutorials/Manuals:</b><br />
					<strong>Package-level:</strong>
							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_PHPonTrax.pkg.html">PHP On Trax</a>
<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_rails_examples.pkg.html">Examples From The Rails Book</a>
</ul>

<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_simpleapp.pkg.html">Build A Simple Trax Application</a>
</ul>

<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_database.pkg.html">Create A Database and User</a>
</ul>

<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_advbuild.pkg.html">Advanced Application Build Topics</a>
</ul>

<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_naming.pkg.html">The Trax Naming Convention</a>
</ul>

<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_troubleshoot.pkg.html">Troubleshooting</a>
</ul>

<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_reference.pkg.html">Reference</a>
</ul>

</li></ul>


										<strong>Class-level:</strong>
							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_ActiveRecordHelper.cls.html">ActiveRecordHelper</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_FormTagHelper.cls.html">FormTagHelper</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_Helpers.cls.html">Helpers</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_UrlHelper.cls.html">UrlHelper</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_FormHelper.cls.html">FormHelper</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_InputFilter.cls.html">InputFilter</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_ActionMailer.cls.html">ActionMailer</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_ApplicationController.cls.html">ApplicationController</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_ActionController.cls.html">ActionController</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_ActiveRecord.cls.html">ActiveRecord</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_DateHelper.cls.html">DateHelper</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_Router.cls.html">Router</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_FormOptionsHelper.cls.html">FormOptionsHelper</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_TraxGenerator.cls.html">TraxGenerator</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_Session.cls.html">Session</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_Inflector.cls.html">Inflector</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_ActiveRecordError.cls.html">ActiveRecordError</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_ActionControllerError.cls.html">ActionControllerError</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_ScaffoldController.cls.html">ScaffoldController</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_Dispatcher.cls.html">Dispatcher</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_TraxError.cls.html">TraxError</a>
</ul>


							<ul>
	<li type="square"><a href="../PHPonTrax/tutorial_ApplicationMailer.cls.html">ApplicationMailer</a>
</ul>


							                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../PHPonTrax/_vendor_trax_action_controller_php.html">		action_controller.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_action_mailer_php.html">		action_mailer.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_action_view_php.html">		action_view.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_active_record_php.html">		active_record.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_action_view_helpers_active_record_helper_php.html">		active_record_helper.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_scaffolds_add_phtml.html">		add.phtml
		</a><br>
			<a href="../PHPonTrax/_data_app_controllers_application_php.html">		application.php
		</a><br>
			<a href="../PHPonTrax/_data_app_views_layouts_application_phtml.html">		application.phtml
		</a><br>
			<a href="../PHPonTrax/_data_app_helpers_application_helper_php.html">		application_helper.php
		</a><br>
			<a href="../PHPonTrax/_data_app_application_mailer_php.html">		application_mailer.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_action_view_helpers_asset_tag_helper_php.html">		asset_tag_helper.php
		</a><br>
			<a href="../PHPonTrax/_test_layouts_catalog_phtml.html">		catalog.phtml
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_scaffolds_generator_templates_controller_php.html">		controller.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_controller_php.html">		controller.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_action_view_helpers_date_helper_php.html">		date_helper.php
		</a><br>
			<a href="../PHPonTrax/_data_config_environments_development_php.html">		development.php
		</a><br>
			<a href="../PHPonTrax/_data_public_dispatch_php.html">		dispatch.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_dispatcher_php.html">		dispatcher.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_scaffolds_edit_phtml.html">		edit.phtml
		</a><br>
			<a href="../PHPonTrax/_data_config_environment_php.html">		environment.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_error_phtml.html">		error.phtml
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_action_view_helpers_form_helper_php.html">		form_helper.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_action_view_helpers_form_options_helper_php.html">		form_options_helper.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_scaffolds_generator_templates_form_scaffolding_phtml.html">		form_scaffolding.phtml
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_action_view_helpers_form_tag_helper_php.html">		form_tag_helper.php
		</a><br>
			<a href="../PHPonTrax/_data_script_generate_php.html">		generate.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_helper_php.html">		helper.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_action_view_helpers_php.html">		helpers.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_scaffolds_index_phtml.html">		index.phtml
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_inflector_php.html">		inflector.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_input_filter_php.html">		input_filter.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_action_view_helpers_javascript_helper_php.html">		javascript_helper.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_scaffolds_generator_templates_layout_phtml.html">		layout.phtml
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_scaffolds_layout_phtml.html">		layout.phtml
		</a><br>
			<a href="../PHPonTrax/_makepkg_php.html">		makepkg.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_model_php.html">		model.php
		</a><br>
			<a href="../PHPonTrax/_data_config_environments_production_php.html">		production.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_router_php.html">		router.php
		</a><br>
			<a href="../PHPonTrax/_data_config_routes_php.html">		routes.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_scaffold_controller_php.html">		scaffold_controller.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_session_php.html">		session.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_scaffolds_show_phtml.html">		show.phtml
		</a><br>
			<a href="../PHPonTrax/_data_config_environments_test_php.html">		test.php
		</a><br>
			<a href="../PHPonTrax/_trax_php.html">		trax.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_trax_exceptions_php.html">		trax_exceptions.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_trax_generator_php.html">		trax_generator.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_action_view_helpers_url_helper_php.html">		url_helper.php
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_view_phtml.html">		view.phtml
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_scaffolds_generator_templates_view_add_phtml.html">		view_add.phtml
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_scaffolds_generator_templates_view_edit_phtml.html">		view_edit.phtml
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_scaffolds_generator_templates_view_index_phtml.html">		view_index.phtml
		</a><br>
			<a href="../PHPonTrax/_vendor_trax_templates_scaffolds_generator_templates_view_show_phtml.html">		view_show.phtml
		</a><br>
	  </div><br />

      
            <b>Classes:</b><br />
        <div class="package">
		    		<a href="../PHPonTrax/.html"></a><br />
	    		<a href="../PHPonTrax/ActionController.html">ActionController</a><br />
	    		<a href="../PHPonTrax/ActionControllerError.html">ActionControllerError</a><br />
	    		<a href="../PHPonTrax/ActionMailer.html">ActionMailer</a><br />
	    		<a href="../PHPonTrax/ActiveRecord.html">ActiveRecord</a><br />
	    		<a href="../PHPonTrax/ActiveRecordError.html">ActiveRecordError</a><br />
	    		<a href="../PHPonTrax/ActiveRecordHelper.html">ActiveRecordHelper</a><br />
	    		<a href="../PHPonTrax/ApplicationController.html">ApplicationController</a><br />
	    		<a href="../PHPonTrax/ApplicationMailer.html">ApplicationMailer</a><br />
	    		<a href="../PHPonTrax/AssetTagHelper.html">AssetTagHelper</a><br />
	    		<a href="../PHPonTrax/DateHelper.html">DateHelper</a><br />
	    		<a href="../PHPonTrax/Dispatcher.html">Dispatcher</a><br />
	    		<a href="../PHPonTrax/FormHelper.html">FormHelper</a><br />
	    		<a href="../PHPonTrax/FormOptionsHelper.html">FormOptionsHelper</a><br />
	    		<a href="../PHPonTrax/FormTagHelper.html">FormTagHelper</a><br />
	    		<a href="../PHPonTrax/Helpers.html">Helpers</a><br />
	    		<a href="../PHPonTrax/Inflector.html">Inflector</a><br />
	    		<a href="../PHPonTrax/InputFilter.html">InputFilter</a><br />
	    		<a href="../PHPonTrax/JavaScriptHelper.html">JavaScriptHelper</a><br />
	    		<a href="../PHPonTrax/Router.html">Router</a><br />
	    		<a href="../PHPonTrax/ScaffoldController.html">ScaffoldController</a><br />
	    		<a href="../PHPonTrax/Session.html">Session</a><br />
	    		<a href="../PHPonTrax/TraxError.html">TraxError</a><br />
	    		<a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a><br />
	    		<a href="../PHPonTrax/UrlHelper.html">UrlHelper</a><br />
	  </div>

                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Class: Inflector</h1>
Source Location: /vendor/trax/inflector.php<br /><br />


<table width="100%" border="0">
<tr><td valign="top">

<h3><a href="#class_details">Class Overview</a></h3>
<pre></pre><br />
<div class="description">Implement the Trax naming convention</div><br /><br />
<h4>Author(s):</h4>
<ul>
        </ul>




    


</td>

<td valign="top">
<h3><a href="#class_vars">Variables</a></h3>
<ul>
    <li><a href="../PHPonTrax/Inflector.html#var$plural_rules">$plural_rules</a></li>
    <li><a href="../PHPonTrax/Inflector.html#var$singular_rules">$singular_rules</a></li>
  </ul>
</td>


<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
    <li><a href="../PHPonTrax/Inflector.html#methodcamelize">camelize</a></li>
    <li><a href="../PHPonTrax/Inflector.html#methodcapitalize">capitalize</a></li>
    <li><a href="../PHPonTrax/Inflector.html#methodclassify">classify</a></li>
    <li><a href="../PHPonTrax/Inflector.html#methodforeign_key">foreign_key</a></li>
    <li><a href="../PHPonTrax/Inflector.html#methodhumanize">humanize</a></li>
    <li><a href="../PHPonTrax/Inflector.html#methodpluralize">pluralize</a></li>
    <li><a href="../PHPonTrax/Inflector.html#methodsingularize">singularize</a></li>
    <li><a href="../PHPonTrax/Inflector.html#methodtableize">tableize</a></li>
    <li><a href="../PHPonTrax/Inflector.html#methodunderscore">underscore</a></li>
  </ul>
</td>

</tr></table>
<hr />

<table width="100%" border="0"><tr>






</tr></table>
<hr />

<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags">
[line <a href="..//__filesource/fsource_PHPonTrax__vendortraxinflector.php.html#a39">39</a>]<br />
Implement the Trax naming convention<br /><br /><p>This class provides static methods to implement the   <a href="../PHPonTrax/tutorial_naming.pkg.html">Trax naming convention</a>.   Inflector is never instantiated.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>tutorial:</b>&nbsp;&nbsp;</td><td><a href="../PHPonTrax/tutorial_Inflector.cls.html">Inflector</a></td>
  </tr>
</table>
</div>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />

<hr />
<a name="class_vars"></a>
<h3>Class Variables</h3>
<div class="tags">
	<a name="var$plural_rules"></a>
	<p></p>
	<h4>$plural_rules = <span class="value">array(&nbsp;&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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;child<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/(.*)status$/'&nbsp;=&gt;&nbsp;'\1statuses',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/s$/'&nbsp;=&gt;&nbsp;'s',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;no&nbsp;change&nbsp;(compatibility)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/$/'&nbsp;=&gt;&nbsp;'s'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)</span></h4>
	<p>[line <a href="..//__filesource/fsource_PHPonTrax__vendortraxinflector.php.html#a44">44</a>]</p>
  Rules for converting an English singular word to plural form<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>static:</b>&nbsp;&nbsp;</td><td></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>private</td>
  </tr>
</table>
</div>

  <br />
	<div class="tags">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><b>Type:</b>&nbsp;&nbsp;</td>
      <td>mixed</td>
    </tr>
      </table>
	</div><br /><br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
	<a name="var$singular_rules"></a>
	<p></p>
	<h4>$singular_rules = <span class="value">array(&nbsp;&nbsp;'/(x|ch|ss)es$/'&nbsp;=&gt;&nbsp;'\1',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/movies$/'&nbsp;=&gt;&nbsp;'movie',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/series$/'&nbsp;=&gt;&nbsp;'series',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/([^aeiouy]|qu)ies$/'&nbsp;=&gt;&nbsp;'\1y',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/([lr])ves$/'&nbsp;=&gt;&nbsp;'\1f',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/([^f])ves$/'&nbsp;=&gt;&nbsp;'\1fe',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/(analy|ba|diagno|parenthe|progno|synop|the)ses$/'&nbsp;=&gt;&nbsp;'\1sis',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/([ti])a$/'&nbsp;=&gt;&nbsp;'\1um',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/people$/'&nbsp;=&gt;&nbsp;'person',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/men$/'&nbsp;=&gt;&nbsp;'man',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/(.*)statuses$/'&nbsp;=&gt;&nbsp;'\1status',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/children$/'&nbsp;=&gt;&nbsp;'child',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/news$/'&nbsp;=&gt;&nbsp;'news',<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'/s$/'&nbsp;=&gt;&nbsp;''<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)</span></h4>
	<p>[line <a href="..//__filesource/fsource_PHPonTrax__vendortraxinflector.php.html#a63">63</a>]</p>
  Rules for converting an English plural word to singular form<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>static:</b>&nbsp;&nbsp;</td><td></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>private</td>
  </tr>
</table>
</div>

  <br />
	<div class="tags">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><b>Type:</b>&nbsp;&nbsp;</td>
      <td>mixed</td>
    </tr>
      </table>
	</div><br /><br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
</div><br />

<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">
  <hr />
	<a name="methodcamelize"></a>
	<h3>method camelize <span class="smalllinenumber">[line <a href="..//__filesource/fsource_PHPonTrax__vendortraxinflector.php.html#a129">129</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>string camelize(
string
$lower_case_and_underscored_word)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Convert a phrase from the lower case and underscored form   to the camel case form<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>Camel case form of the phrase</td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$lower_case_and_underscored_word</b>&nbsp;&nbsp;</td>
        <td>Phrase to                                                   convert</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcapitalize"></a>
	<h3>method capitalize <span class="smalllinenumber">[line <a href="..//__filesource/fsource_PHPonTrax__vendortraxinflector.php.html#a117">117</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>string capitalize(
string
$word)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Capitalize a word making it all lower case with first letter uppercase<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>Capitalized $word</td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$word</b>&nbsp;&nbsp;</td>
        <td>Word to be capitalized</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodclassify"></a>
	<h3>method classify <span class="smalllinenumber">[line <a href="..//__filesource/fsource_PHPonTrax__vendortraxinflector.php.html#a176">176</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>string classify(
string
$table_name)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Convert a table name to the corresponding class name<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>Singular CamelCase form of $table_name</td>
  </tr>
  <tr>
    <td><b>usedby:</b>&nbsp;&nbsp;</td><td><a href="../PHPonTrax/TraxGenerator.html#methodgenerate_scaffold">TraxGenerator::generate_scaffold()</a></td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$table_name</b>&nbsp;&nbsp;</td>
        <td>Name of table in the database</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodforeign_key"></a>
	<h3>method foreign_key <span class="smalllinenumber">[line <a href="..//__filesource/fsource_PHPonTrax__vendortraxinflector.php.html#a187">187</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>string foreign_key(
mixed
$class_name, string
$table_name)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Get foreign key column corresponding to a table name<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>Column name of the foreign key column</td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$table_name</b>&nbsp;&nbsp;</td>
        <td>Name of table referenced by foreign     key</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodhumanize"></a>
	<h3>method humanize <span class="smalllinenumber">[line <a href="..//__filesource/fsource_PHPonTrax__vendortraxinflector.php.html#a153">153</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>string humanize(
string
$lower_case_and_underscored_word)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Generate a more human version of a lower case underscored word<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>The input value with underscores replaced by   blanks and the first letter of each word capitalized</td>
  </tr>
  <tr>
    <td><b>usedby:</b>&nbsp;&nbsp;</td><td><a href="../PHPonTrax/TraxGenerator.html#methodgenerate_scaffold">TraxGenerator::generate_scaffold()</a></td>
  </tr>
  <tr>
    <td><b>usedby:</b>&nbsp;&nbsp;</td><td><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_messages_for">ActiveRecordHelper::error_messages_for()</a></td>
  </tr>
  <tr>
    <td><b>usedby:</b>&nbsp;&nbsp;</td><td><a href="../PHPonTrax/ActiveRecord.html#methodset_content_columns">ActiveRecord::set_content_columns()</a></td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$lower_case_and_underscored_word</b>&nbsp;&nbsp;</td>
        <td>A word or phrase in                                            lower_case_underscore form</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodpluralize"></a>
	<h3>method pluralize <span class="smalllinenumber">[line <a href="..//__filesource/fsource_PHPonTrax__vendortraxinflector.php.html#a87">87</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>string pluralize(
string
$word)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Pluralize a word according to English rules<br /><br /><p>Convert a lower-case singular word to plural form.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>Plural of $word</td>
  </tr>
  <tr>
    <td><b>usedby:</b>&nbsp;&nbsp;</td><td><a href="../PHPonTrax/TraxGenerator.html#methodgenerate_scaffold">TraxGenerator::generate_scaffold()</a></td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$word</b>&nbsp;&nbsp;</td>
        <td>Word to be pluralized</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodsingularize"></a>
	<h3>method singularize <span class="smalllinenumber">[line <a href="..//__filesource/fsource_PHPonTrax__vendortraxinflector.php.html#a102">102</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>string singularize(
string
$word)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Singularize a word according to English rules<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>Singular of $word</td>
  </tr>
  <tr>
    <td><b>usedby:</b>&nbsp;&nbsp;</td><td><a href="../PHPonTrax/TraxGenerator.html#methodgenerate_scaffold">TraxGenerator::generate_scaffold()</a></td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$word</b>&nbsp;&nbsp;</td>
        <td>Word to be singularized</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodtableize"></a>
	<h3>method tableize <span class="smalllinenumber">[line <a href="..//__filesource/fsource_PHPonTrax__vendortraxinflector.php.html#a166">166</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>string tableize(
string
$class_name)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Convert a class name to the corresponding table name<br /><br /><p>The class name is a singular word or phrase in CamelCase.   By convention it corresponds to a table whose name is a plural   word or phrase in lower case underscore form.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>Pluralized lower_case_underscore form of name</td>
  </tr>
  <tr>
    <td><b>usedby:</b>&nbsp;&nbsp;</td><td><a href="../PHPonTrax/ActiveRecord.html#methodset_table_name_using_class_name">ActiveRecord::set_table_name_using_class_name()</a></td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$class_name</b>&nbsp;&nbsp;</td>
        <td>Name of <a href="../PHPonTrax/ActiveRecord.html">ActiveRecord</a> sub-class</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodunderscore"></a>
	<h3>method underscore <span class="smalllinenumber">[line <a href="..//__filesource/fsource_PHPonTrax__vendortraxinflector.php.html#a140">140</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>string underscore(
string
$camel_cased_word)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Convert a phrase from the camel case form to the lower case   and underscored form<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>Lower case and underscored form of the phrase</td>
  </tr>
  <tr>
    <td><b>usedby:</b>&nbsp;&nbsp;</td><td><a href="../PHPonTrax/TraxGenerator.html#methodgenerate_scaffold">TraxGenerator::generate_scaffold()</a></td>
  </tr>
  <tr>
    <td><b>usedby:</b>&nbsp;&nbsp;</td><td><a href="../PHPonTrax/TraxGenerator.html#methodgenerate_model">TraxGenerator::generate_model()</a></td>
  </tr>
  <tr>
    <td><b>usedby:</b>&nbsp;&nbsp;</td><td><a href="../PHPonTrax/TraxGenerator.html#methodgenerate_controller">TraxGenerator::generate_controller()</a></td>
  </tr>
</table>
</div>
<br /><br />


        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$camel_cased_word</b>&nbsp;&nbsp;</td>
        <td>Phrase to convert</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
</div><br />


        <div class="credit">
		    <hr />
		    Documentation generated on Thu, 04 May 2006 19:47:46 -0600 by <a href="http://www.phpdoc.org">phpDocumentor 1.3.0RC4</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>
Return current item: PHP on Trax