Location: PHPKode > projects > Aukyla Platform > doc/html/a00212.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>Decoration.php</h1><div class="fragment"><pre class="fragment">00001 &lt;?php
00002 <span class="comment">/*</span>
00003 <span class="comment">     Decoration.php, obsolete</span>
00004 <span class="comment">     Copyright (C) 2003-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 
<a name="l00038"></a><a class="code" href="a00099.html">00038</a> <span class="keyword">class </span><a class="code" href="a00099.html">Decoration</a>
00039 {
00043         <span class="keyword">private</span> function __construct()
00044         {
00045                 $username = (class_exists('<a class="code" href="a00122.html">Login</a>') ? <a class="code" href="a00122.html#e2">Login::username</a>() : '');
00046 
00047                 $this-&gt;config = <span class="keyword">new</span> <a class="code" href="a00092.html">Config</a>('', $username);
00048                 $this-&gt;useDecorations = ($this-&gt;config-&gt;variable('useDecorations', '<span class="keyword">true</span>') == '<span class="keyword">true</span>');
00049         }
00050 
<a name="l00055"></a><a class="code" href="a00099.html#e0">00055</a>         <span class="keyword">public</span> <span class="keyword">static</span> function theme()
00056         {
00057                 $instance = self::instance();
00058 
00059                 <span class="keywordflow">return</span> $instance-&gt;config-&gt;variable('theme', '<span class="keywordflow">default</span>');
00060         }
00061 
<a name="l00067"></a><a class="code" href="a00099.html#e1">00067</a>         <span class="keyword">public</span> <span class="keyword">static</span> function availableThemes()
00068         {
00069                 $instance = self::instance();
00070 
00071                 <span class="keywordflow">if</span>(isset($instance-&gt;themes) == <span class="keyword">false</span>)
00072                 {
00073                         $lines = file('resources/base/themes/themes');
00074                         foreach($lines as $line)
00075                         {
00076                                 list($css, $name) = explode(<span class="charliteral">':'</span>, trim($line));
00077                                 $instance-&gt;themes[$css] = $name;
00078                         }
00079                 }
00080                 <span class="keywordflow">return</span> $instance-&gt;themes;
00081         }
00082 
<a name="l00088"></a><a class="code" href="a00099.html#e2">00088</a>         <span class="keyword">public</span> <span class="keyword">static</span> function useDecorations()
00089         {
00090                 $instance = self::instance();
00091 
00092                 <span class="keywordflow">return</span> $instance-&gt;useDecorations;
00093         }
00094 
00095         <span class="keyword">private</span> <span class="keyword">static</span> function instance()
00096         {
00097                 <span class="keywordflow">if</span>(self::$instance == null)
00098                 {
00099                         self::$instance = <span class="keyword">new</span> <a class="code" href="a00099.html">Decoration</a>();
00100                 }
00101 
00102                 <span class="keywordflow">return</span> self::$instance;
00103         }
00104 
00105         <span class="keyword">private</span> <span class="keyword">static</span> $instance = null;
00106         <span class="keyword">private</span> $config;
00107         <span class="keyword">private</span> $useDecorations;
00108         <span class="keyword">private</span> $themes;
00109 }
00110 
00111 ?&gt;
</pre></div>    </div>
  </body>
</html>
Return current item: Aukyla Platform