Location: PHPKode > projects > Aukyla Platform > aukyla/doc/html/a00100.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>Aukyla PHP Framework</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="StyleSheet" href="auton.css" type="text/css" media="screen">
  </head>

  <body>
    <div id="mainmenu">
      <a href="http://www.auton.nl/" class="home">Home</a>
    </div>
    <div id="submenu">
      <a class="logo" href="http://www.auton.nl/"></a>

      <div class="head">Ads</div>
      <a href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=116358&amp;type=1" alt="SourceForge.net Logo" style="padding: 2px 4px; width: 88px; height: 31px; border: 0px"></a>
      <a href="http://getfirefox.com/" title="Get Firefox - The Browser, Reloaded."><img src="http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png" alt="Get Firefox" style="width: 110px; height: 32px; border: 0px"></a>
    </div>
    <div id="main">
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>Document Class Reference</h1><a href="a00013.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Central class for working with documents. 
<p>
This class provides functions to determine whether viewers or editors for certain document types exist and to save edited documents. Under the hood, this class also manages the loading of document handlers when needed.<p>
If you want to add a viewer or editor for documents as a widget, use one of the <a class="el" href="a00103.html">DocumentViewer</a> or <a class="el" href="a00101.html">DocumentEditor</a> classes instead. 
<p>

<p>
Definition at line <a class="el" href="a00213.html#l00043">43</a> of file <a class="el" href="a00213.html">Document.php</a>.<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00100.html#e0">hasViewer</a> ($mimetype)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00100.html#e1">hasEditor</a> ($mimetype)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00100.html#e2">save</a> ($id, $uri, $mimetype)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00100.html#e3">hasIndexer</a> ($mimetype)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00100.html#e4">index</a> ($documentId, $uri)</td></tr>

</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="e1" doxytag="Document::hasEditor"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Document::hasEditor           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>mimetype</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Checks whether an editor is available for the given MIME type.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mimetype</em>&nbsp;</td><td>The MIME type for which an editor should be found.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>true</code> if an editor was found, <code>false</code> otherwise.</dd></dl>

<p>
Definition at line <a class="el" href="a00213.html#l00070">70</a> of file <a class="el" href="a00213.html">Document.php</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e3" doxytag="Document::hasIndexer"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Document::hasIndexer           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>mimetype</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Checks whether an indexer is available for the given MIME type.<p>
<dl compact><dt><b>Note:</b></dt><dd>The default implementation of <a class="el" href="a00100.html#e4">index()</a> still indexes a document's meta-data as stored by the <a class="el" href="a00163.html">URI</a> handler. This means that even though a document may not have a specific content indexer, you can still call <a class="el" href="a00100.html#e4">index()</a> on it to index its meta-data.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mimetype</em>&nbsp;</td><td>The MIME type for which an indexer should be found.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>true</code> if an indexer was found, <code>false</code> otherwise.</dd></dl>
<dl compact><dt><b>Since:</b></dt><dd>Aukyla 1.1</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00145.html">Search</a></dd></dl>

<p>
Definition at line <a class="el" href="a00213.html#l00118">118</a> of file <a class="el" href="a00213.html">Document.php</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e0" doxytag="Document::hasViewer"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Document::hasViewer           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>mimetype</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Checks whether a viewer is available for the given MIME type.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mimetype</em>&nbsp;</td><td>The MIME type for which a viewer should be found.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>true</code> if a viewer was found, <code>false</code> otherwise.</dd></dl>

<p>
Definition at line <a class="el" href="a00213.html#l00052">52</a> of file <a class="el" href="a00213.html">Document.php</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e4" doxytag="Document::index"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Document::index           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>documentId</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>uri</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Indexes a given document.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>documentId</em>&nbsp;</td><td>ID in the search database of the document to index. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>uri</em>&nbsp;</td><td>The <a class="el" href="a00163.html">URI</a> to the document which should be indexed.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Note:</b></dt><dd>This function is called automatically when you call Search::addDocument().</dd></dl>
<dl compact><dt><b>Since:</b></dt><dd>Aukyla 1.1</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00145.html">Search</a></dd></dl>

<p>
Definition at line <a class="el" href="a00213.html#l00142">142</a> of file <a class="el" href="a00213.html">Document.php</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e2" doxytag="Document::save"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Document::save           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>id</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>uri</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>mimetype</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Saves an edited document.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>id</em>&nbsp;</td><td>The ID of the widget through which it was edited. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>uri</em>&nbsp;</td><td>The <a class="el" href="a00163.html">URI</a> to which the document should be saved. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mimetype</em>&nbsp;</td><td>The MIME type of the document. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>true</code> on success, <code>false</code> otherwise.</dd></dl>

<p>
Definition at line <a class="el" href="a00213.html#l00089">89</a> of file <a class="el" href="a00213.html">Document.php</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00213.html">Document.php</a></ul>
    </div>
  </body>
</html>
Return current item: Aukyla Platform