Location: PHPKode > projects > Aukyla Platform > doc/html/a00214.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>
<div class="nav">
<a class="el" href="dir_000000.html">base</a></div>
<h1>DocumentHandler.php</h1><div class="fragment"><pre class="fragment">00001 &lt;?php
00002 <span class="comment">/*</span>
00003 <span class="comment">     DocumentHandler.php, Base class for implementing new document handlers.</span>
00004 <span class="comment">     Copyright (C) 2004 Arend van Beelen, Auton Rijnsburg</span>
00005 <span class="comment"></span>
00006 <span class="comment">     This program is free software; you can redistribute it and/or modify it</span>
00007 <span class="comment">     under the terms of the GNU General Public License as published by the Free</span>
00008 <span class="comment">     Software Foundation; either version 2 of the License, or (at your option)</span>
00009 <span class="comment">     any later version.</span>
00010 <span class="comment"></span>
00011 <span class="comment">     This program is distributed in the hope that it will be useful, but WITHOUT</span>
00012 <span class="comment">     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or</span>
00013 <span class="comment">     FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for</span>
00014 <span class="comment">     more details.</span>
00015 <span class="comment"></span>
00016 <span class="comment">     You should have received a copy of the GNU General Public License along</span>
00017 <span class="comment">     with this program; if not, write to the Free Software Foundation, Inc.,</span>
00018 <span class="comment">     59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
00019 <span class="comment"></span>
00020 <span class="comment">     For any questions, comments or whatever, you may mail me at: hide@address.com</span>
00021 <span class="comment">*/</span>
00022 
00023 require_once('<a class="code" href="a00145.html">Search</a>.php');
00024 require_once('<a class="code" href="a00163.html">URI</a>.php');
00025 
<a name="l00049"></a><a class="code" href="a00102.html">00049</a> <span class="keyword">class </span><a class="code" href="a00102.html">DocumentHandler</a>
00050 {
<a name="l00064"></a><a class="code" href="a00102.html#e0">00064</a>         <span class="keyword">public</span> <span class="keyword">static</span> function supportsViewing()
00065         {
00066                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00067         }
00068 
<a name="l00083"></a><a class="code" href="a00102.html#e1">00083</a>         <span class="keyword">public</span> <span class="keyword">static</span> function view(<a class="code" href="a00096.html">Container</a> $parent, $uri)
00084         {
00085                 <span class="keywordflow">return</span>;
00086         }
00087 
<a name="l00099"></a><a class="code" href="a00102.html#e2">00099</a>         <span class="keyword">public</span> <span class="keyword">static</span> function supportsEditing()
00100         {
00101                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00102         }
00103 
<a name="l00120"></a><a class="code" href="a00102.html#e3">00120</a>         <span class="keyword">public</span> <span class="keyword">static</span> function edit(<a class="code" href="a00096.html">Container</a> $parent, $<span class="keywordtype">id</span>, $uri = '')
00121         {
00122                 <span class="keywordflow">return</span>;
00123         }
00124 
<a name="l00141"></a><a class="code" href="a00102.html#e4">00141</a>         <span class="keyword">public</span> <span class="keyword">static</span> function save($<span class="keywordtype">id</span>, $uri)
00142         {
00143                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00144         }
00145 
<a name="l00163"></a><a class="code" href="a00102.html#e5">00163</a>         <span class="keyword">public</span> <span class="keyword">static</span> function supportsIndexing()
00164         {
00165                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00166         }
00167 
<a name="l00189"></a><a class="code" href="a00102.html#e6">00189</a>         <span class="keyword">public</span> <span class="keyword">static</span> function index($documentId, $uri)
00190         {
00191                 $search = <a class="code" href="a00145.html#e0">Search::instance</a>();
00192 
00193                 $name     = <a class="code" href="a00163.html#e33">URI::metaData</a>($uri, 'name');
00194                 $comment  = <a class="code" href="a00163.html#e33">URI::metaData</a>($uri, 'comment');
00195                 $keywords = <a class="code" href="a00163.html#e33">URI::metaData</a>($uri, 'keywords');
00196                 $author   = <a class="code" href="a00163.html#e33">URI::metaData</a>($uri, 'author');
00197 
00198                 <span class="keywordflow">if</span>($name != '')
00199                 {
00200                         $search-&gt;indexText($documentId, $name, 50);
00201                 }
00202                 <span class="keywordflow">if</span>($comment != '')
00203                 {
00204                         $search-&gt;indexText($documentId, $comment, 20);
00205                 }
00206                 <span class="keywordflow">if</span>($keywords != '')
00207                 {
00208                         $search-&gt;indexText($documentId, $keywords, 30);
00209                 }
00210                 <span class="keywordflow">if</span>($author != '')
00211                 {
00212                         $search-&gt;indexText($documentId, $author, 20);
00213                 }
00214         }
00215 }
00216 
00217 ?&gt;
</pre></div>    </div>
  </body>
</html>
Return current item: Aukyla Platform