Location: PHPKode > scripts > Flatfile > flatfile/docs/flatfile/TableUtils.html
<html>
<head>
<title>Docs For Class TableUtils</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">flatfile</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_flatfile.html" class="menu">class tree: flatfile</a> ]
		  [ <a href="../elementindex_flatfile.html" class="menu">index: flatfile</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">
      <b>Packages:</b><br />
              <a href="../li_flatfile.html">flatfile</a><br />
            <br /><br />
		<b>Tutorials/Manuals:</b><br />
					<strong>Package-level:</strong>
							<ul>
	<li type="square"><a href="../flatfile/tutorial_flatfile.pkg.html">Flatfile Tutorial</a>
</ul>


									                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../flatfile/_flatfile.php.html">		flatfile.php
		</a><br>
			<a href="../flatfile/_flatfile_utils.php.html">		flatfile_utils.php
		</a><br>
	  </div><br />

      
      
            <b>Classes:</b><br />
        <div class="package">
		    		<a href="../flatfile/AndWhereClause.html">AndWhereClause</a><br />
	    		<a href="../flatfile/Column.html">Column</a><br />
	    		<a href="../flatfile/CompositeWhereClause.html">CompositeWhereClause</a><br />
	    		<a href="../flatfile/Flatfile.html">Flatfile</a><br />
	    		<a href="../flatfile/JoinColumn.html">JoinColumn</a><br />
	    		<a href="../flatfile/LikeWhereClause.html">LikeWhereClause</a><br />
	    		<a href="../flatfile/ListWhereClause.html">ListWhereClause</a><br />
	    		<a href="../flatfile/NotWhere.html">NotWhere</a><br />
	    		<a href="../flatfile/OrderBy.html">OrderBy</a><br />
	    		<a href="../flatfile/OrWhereClause.html">OrWhereClause</a><br />
	    		<a href="../flatfile/SimpleWhereClause.html">SimpleWhereClause</a><br />
	    		<a href="../flatfile/TableUtils.html">TableUtils</a><br />
	    		<a href="../flatfile/WhereClause.html">WhereClause</a><br />
	  </div>

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

<h1>Class: TableUtils</h1>
Source Location: /flatfile_utils.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">EXPERIMENTAL: Utilities for handling definitions of tables.</div><br /><br />






        
</td>



<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
    <li><a href="../flatfile/TableUtils.html#methodcreateDefines">createDefines</a></li>
    <li><a href="../flatfile/TableUtils.html#methodcreateRowSchema">createRowSchema</a></li>
    <li><a href="../flatfile/TableUtils.html#methodresolveJoins">resolveJoins</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 42]<br />
EXPERIMENTAL: Utilities for handling definitions of tables.<br /><br /></div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />


<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">

  <hr />
	<a name="methodcreateDefines"></a>
	<h3>method createDefines <span class="smalllinenumber">[line 82]</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>void createDefines(

&$tables)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Uses 'define' to create global constants for all the column names<br /><br /><br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>&$tables</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcreateRowSchema"></a>
	<h3>method createRowSchema <span class="smalllinenumber">[line 101]</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>void createRowSchema(

&$tabledef)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Creates a 'row schema' for a given table definition.<br /><br /><p>A row schema is just an array of the column types for a table,  using the constants defined above.</p><br /><br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>&$tabledef</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodresolveJoins"></a>
	<h3>method resolveJoins <span class="smalllinenumber">[line 52]</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>void resolveJoins(
tables
&$tables)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Finds JoinColumns in an array of tables, and adds 'type' fields by looking up the columns<br /><br /><br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">tables&nbsp;&nbsp;</td>
        <td><b>&$tables</b>&nbsp;&nbsp;</td>
        <td>This should be an associative array containing 'tablename' =&gt; tabledefinition  tabledefinition is itself an associativive array of 'COLUMN_NAME_CONSTANT' =&gt; columndefintion  COLUMN_NAME_CONSTANT should be a unique constant within the table, and  column definition should be a Column object or JoinColumn object</td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
</div><br />


        <div class="credit">
		    <hr />
		    Documentation generated on Mon, 30 Jun 2008 12:23:21 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.3.2</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>
Return current item: Flatfile