Location: PHPKode > projects > cataBlog > cataBlog-0.1-pre_alpha/0.1-pre_alpha/Module/cataBlog.php
<?php
/**
 * @license PHP
 * @author  Jackson Miller <hide@address.com>
 * @version $Id: cataBlog.php,v 1.2 2004/09/13 15:23:12 jaxn Exp $
 */
 
/**
 * @uses   CEP_Local_Web
 */
require_once(CEP_DIR_LOCAL.CEP_LOCAL_WEB);

/**
 * cataBlog is a multi-user, multi-category web blog toolset for Core Enterprise PHP
 * @link http://phpenterprise.net Core Enterprise PHP
 * @link http://sf.net/projects/cep CEP @ SourceForge
 *
 * cataBlog has the following states:
 * - Add
 * - Edit
 * - Delete
 * - Read
 * - Recent
 * - List
 * - Archives
 * - Calendar
 * - RSS
 * - Atom
 * - AddComment
 * - EditComment
 * - AddTrackBack
 * - AddPingBack
 * - LiveJournal
 *
 * @todo Add an automatic linkblog
 * @todo Add link tracking?
 * @todo Add auto-replacements
 * @todo Add auto-linking
 */
class CEP_Module_cataBlog extends CEP_Local_Web {

    /**
     * The default state is 'Recent'
     */
    var $state = 'Recent';
    
    /**
     * cataBlog component loader
     * @param  array  $cep_get_vars
     * @return object
     */
    function cepLoad($cep_get_vars) {
        $state = 'Recent';
        if (isset($cep_get_vars['state'])) {
            $state = $cep_get_vars['state'];
        }
        
        switch ($state) {
            case ('Add'):
            case ('Edit'):
            case ('Delete'):
                require_once('CEP/Module/cataBlog/Form.php');
                return new CEP_Module_cataBlog_Form($cep_get_vars);
                break;
            case ('Read'):
            case ('Recent'):
            case ('List'):
            case ('Archives'):
                require_once('CEP/Module/cataBlog/Display.php');
                return new CEP_Module_cataBlog_Display($cep_get_vars);
                break;
            case ('Calendar'):
                require_once('CEP/Module/cataBlog/Calendar.php');
                return new CEP_Module_cataBlog_Calendar($cep_get_vars);
                break;
            case ('RSS'):
            case ('Atom'):
                require_once('CEP/Module/cataBlog/Feeds.php');
                return new CEP_Module_cataBlog_Feeds($cep_get_vars);
                break;
            case ('AddComment'):
            case ('EditComment'):
                require_once('CEP/Module/cataBlog/CommentForm.php');
                return new CEP_Module_cataBlog_CommentForm($cep_get_vars);
                break;
            case ('AddTrackBack'):
            case ('AddPingBack'):
                require_once('CEP/Module/cataBlog/TrackPing.php');
                return new CEP_Module_cataBlog_TrackPing($cep_get_vars);
                break;
            case ('LiveJournalAPI'):
                require_once('CEP/Module/cataBlog/LiveJournal.php');
                return new CEP_Module_cataBlog_LiveJournal($cep_get_vars);
                break;
        }
        
        return;
    }
    
}
?>
Return current item: cataBlog