Location: PHPKode > projects > Blandware AtLeap Lite - CMS on PHP > atleaplite/docs/developer-guide.html
<html>
<head>
<title>AtleapLite Developer Guide</title>
</head>
<body>
<h1>AtleapLite Developer Guide</h1>
<p>
TODO: extend this
</p>

<h2>Setting environment</h2>

<p>
Most commands described here require that you have one of following variables
set (<b>PHP_INSTALL_DIR</b> or <b>PHPRC</b>) which contains path to
directory where PHP is installed.</p>

<h2>Refreshing database schema reflection in generated classes</h2>
<p>
AtleapLite uses
<a href="http://pear.php.net/package/DB_DataObject" target="_blank">DB_DataObject</a>
<a href="http://pear.php.net" target="_blank">PEAR</a> package. DB_DataObject
has a generator
which generates DAO classes (and INI file with schema metadata) from database
schema. AtleapLite contains classes (and INI) generated from MySQL database
under PHP4; they seem to work with Sqlite and PHP5 too. But when changing DB
schema (adding tables, changing existing) need to synchronize changes arises.
</p>
<p>
Run 'bin/gen' from directory to which AtleapLite is
unpacked. This should refresh existing classes and create new ones in
<tt>include/dataobject</tt> directory and INI in <tt>dataobject</tt> directory.
</p>

<h2>Creating initial database for sqlite</h2>
<p>
For MySQL and Postgres, it's convenient to their clients. But for sqlite
scripts seem to be a better choice.
</p>
<p>
Run 'bin/init-sqlite' from install directory;
this will simply execute scripts <tt>metadata/sql/sqlite/create-tables.sql</tt>
and <tt>metadata/sql/sqlite/minimal-data.sql</tt> on database which DSN is
defined in <tt>server_variables.php</tt>. <em>(Note! By default scripts are for
sqlite, so DSN is expected to be a DSN of sqlite DB.)</em> You can modify these
scripts if you need or <tt>init_sqlite.php</tt> to change scripts set.
</p>

<h2>Generating PHPDoc</h2>

<p>
To generate PHPDoc, run 'bin/gen-phpdoc'. Note, that for this you need to
install PHPDocumentor.
By default, documentation is being generated to <tt>docs/phpdoc</tt> directory.
</p>

<h2>Files/directories layout</h2>

<p>
    <ul>
        <li>
<b>bin</b> directory contains bat/shell scripts used to generate classes,
execute SQL
        </li>
        <li>
<b>css</b> contains CSS scripts used by application
        </li>
        <li>
<b>dataobject</b> - here DataObject configuration and schema metadata (that
INI file generated from database when generated classes) reside
        </li>
        <li>
<b>db</b> contains sqlite default DB (and its backup)
        </li>
        <li>
<b>docs</b> directory for documentation; its subdirectory named <tt>phpdoc</tt>
contains (or should contain) documentation generated by
<a href="http://www.phpdoc.org/" target="_blank">PHPDocumentor</a>
        </li>
        <li>
<b>fckeditor</b> directory with <a href="http://www.fckeditor.net/"
target="_blank">FCKEditor</a>
        </li>
        <li>
<b>images</b> here are site images
        </li>
        <li>
<b>include</b> here are PHP files used as includes
        </li>
        <li>
<b>js</b> here are site javascripts
        </li>
        <li>
<b>lib</b> here are libraries used by application; they are slightly modified
(see README file in this directory for details). License files for libraries
are in this directory too.
        </li>
        <li>
<b>metadata</b> some metadata (currently SQL scripts for initial DB creation
and translations of application messages)
        </li>
        <li>
<b>smarty</b> <a href="http://www.smarty.net/" target="_blank">Smarty</a>
directory; in its <tt>templates</tt> directory there're templates, while
<tt>config</tt> contains configs (not used currently).
        </li>
        <li>
<b>uploaded</b> directory to which files uploaded through FCKEditor are stored
        </li>
    </ul>
</p>

</body>
</html>
Return current item: Blandware AtLeap Lite - CMS on PHP