CHips L MINI SHELL

CHips L pro

Current Path : /opt/cpanel/ea-php54/root/usr/share/pear/RVSeagullMod/lib/RVSGL/
Upload File :
Current File : //opt/cpanel/ea-php54/root/usr/share/pear/RVSeagullMod/lib/RVSGL/DaoFactory.php

<?php
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
// WebSite:  http://www.rvglobalsoft.com
// Unauthorized copying is strictly forbidden and may result in severe legal action.
// Copyright (c) 2006 RV Global Soft Co.,Ltd. All rights reserved.
//
// =====YOU MUST KEEP THIS COPYRIGHTS NOTICE INTACT AND CAN NOT BE REMOVE =======
// Copyright (c) 2006 RV Global Soft Co.,Ltd. All rights reserved.
// This Agreement is a legal contract, which specifies the terms of the license
// and warranty limitation between you and RV Global Soft Co.,Ltd. and RV Site Builder.
// You should carefully read the following terms and conditions before
// installing or using this software.  Unless you have a different license
// agreement obtained from RV Global Soft Co.,Ltd., installation or use of this software
// indicates your acceptance of the license and warranty limitation terms
// contained in this Agreement. If you do not agree to the terms of this
// Agreement, promptly delete and destroy all copies of the Software.
//
// =====  Grant of License =======
// The Software may only be installed and used on a single host machine.
//
// =====  Disclaimer of Warranty =======
// THIS SOFTWARE AND ACCOMPANYING DOCUMENTATION ARE PROVIDED "AS IS" AND
// WITHOUT WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER
// WARRANTIES WHETHER EXPRESSED OR IMPLIED.   BECAUSE OF THE VARIOUS HARDWARE
// AND SOFTWARE ENVIRONMENTS INTO WHICH RV SITE BUILDER MAY BE USED, NO WARRANTY OF
// FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.  THE USER MUST ASSUME THE
// ENTIRE RISK OF USING THIS PROGRAM.  ANY LIABILITY OF RV GLOBAL SOFT CO.,LTD. WILL BE
// LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE.
// IN NO CASE SHALL RV GLOBAL SOFT CO.,LTD. BE LIABLE FOR ANY INCIDENTAL, SPECIAL OR
// CONSEQUENTIAL DAMAGES OR LOSS, INCLUDING, WITHOUT LIMITATION, LOST PROFITS
// OR THE INABILITY TO USE EQUIPMENT OR ACCESS DATA, WHETHER SUCH DAMAGES ARE
// BASED UPON A BREACH OF EXPRESS OR IMPLIED WARRANTIES, BREACH OF CONTRACT,
// NEGLIGENCE, STRICT TORT, OR ANY OTHER LEGAL THEORY. THIS IS TRUE EVEN IF
// RV GLOBAL SOFT CO.,LTD. IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO CASE WILL
// RV GLOBAL SOFT CO.,LTD.'S LIABILITY EXCEED THE AMOUNT OF THE LICENSE FEE ACTUALLY PAID
// BY LICENSEE TO RV GLOBAL SOFT CO.,LTD.
// +---------------------------------------------------------------------------+
// $Id$
// +---------------------------------------------------------------------------+

/**
 * Data Access Object Factory.
 *
 * @package sitebuilder
 * @author  Pairote Manunphol <pairote@rvglobalsoft.com>
 * @author  Parinya <parinya@rvglobalsoft.com>
 * @version $Revision$
 * @since   PHP 4.1
 */
require_once dirname(__FILE__) . '/SitebuilderDao/DbWrapper.php';

class DaoFactory
{
    function DaoFactory() { }

    public static function factory($method=null, $autoload=false)
    {
        return DaoFactory::$method($autoload);
    }

    public static function Usr($autoload=false)
    {
        require_once('SitebuilderDao/UsrDao.php');
        $oUsrDao = UsrDAO::singleton($autoload);
        return $oUsrDao;
    }

    public static function Project($autoload=false)
    {
        require_once(dirname(__FILE__) . '/SitebuilderDao/ProjectDao.php');
        $oProjectDao = ProjectDao::singleton($autoload);
        return $oProjectDao;
    }

    public static function ProjectPage($autoload=false)
    {
        require_once('SitebuilderDao/ProjectPageDao.php');
        $oProjectPageDao = ProjectPageDao::singleton($autoload);
        return $oProjectPageDao;
    }

    public static function Navigator($autoload=false)
    {
        require_once('SitebuilderDao/NavigatorDao.php');
        $oNavigatorDao = NavigatorDao::singleton($autoload);
        return $oNavigatorDao;
    }

	public static function Color($autoload=false)
    {
        require_once('SitebuilderDao/ColorDao.php');
        $oRvsNavigatorDao = ColorDao::singleton($autoload);
        return $oRvsNavigatorDao;
    }

	public static function Category($autoload=false)
    {
        require_once('SitebuilderDao/CategoryDao.php');
        $oCategoryDao = CategoryDao::singleton($autoload);
        return $oCategoryDao;
    }

	public static function Charset($autoload=false)
    {
        require_once('SitebuilderDao/CharsetDao.php');
        $oCharsetDao = CharsetDao::singleton($autoload);
        return $oCharsetDao;
    }

	public static function Component($autoload=false)
    {
        require_once('SitebuilderDao/ComponentDao.php');
        $oComponentDao = ComponentDao::singleton($autoload);
        return $oComponentDao;
    }

	public static function OutSuggestion($autoload=false)
    {
        require_once('SitebuilderDao/OutSuggestionDao.php');
        $oOutSuggestionDao = OutSuggestionDao::singleton($autoload);
        return $oOutSuggestionDao;
    }

    public static function Template($autoload=false)
    {
        require_once('SitebuilderDao/TemplateDao.php');
        $oTemplateDao = TemplateDao::singleton($autoload);
        return $oTemplateDao;
    }

	public static function TemplateImport($autoload=false)
    {
        require_once('SitebuilderDao/TemplateImportDao.php');
        $oTemplateImportDao = TemplateImportDao::singleton($autoload);
        return $oTemplateImportDao;
    }

	public static function LayoutTemplate($autoload=false)
    {
        require_once('SitebuilderDao/LayoutTemplateDao.php');
        $oLayoutTemplateDao = LayoutTemplateDao::singleton($autoload);
        return $oLayoutTemplateDao;
    }

	public static function FlashOnline($autoload=false)
    {
        require_once('SitebuilderDao/FlashOnlineDao.php');
        $oFlashOnlineDao = FlashOnlineDao::singleton($autoload);
        return $oFlashOnlineDao;
    }

	public static function OnlineForm($autoload=false)
    {
        require_once('SitebuilderDao/OnlineFormDao.php');
        $oOnlineFormDao = OnlineFormDao::singleton($autoload);
        return $oOnlineFormDao;
    }

    public static function Jotform($autoload=false)
    {
    	require_once('SitebuilderDao/JotformDao.php');
        $oJotformDao = JotformDao::singleton($autoload);
        return $oJotformDao;
    }

    public static function OnlineCounter($autoload = false)
    {
        require_once('SitebuilderDao/OnlineCounterDao.php');
        $oOnlineCounterDao = OnlineCounterDao::singleton($autoload);
        return $oOnlineCounterDao;
    }

	public static function Publish($autoload=false)
    {
        require_once('SitebuilderDao/PublishDao.php');
        $oPublishDao = PublishDao::singleton($autoload);
        return $oPublishDao;
    }

	public static function InternalPage($autoload=false)
    {
        require_once('SitebuilderDao/InternalPageDao.php');
        $oInternalPageDao = InternalPageDao::singleton($autoload);
        return $oInternalPageDao;
    }

	public static function AdminConfig($autoload=false)
    {
        require_once('SitebuilderDao/AdminConfigDao.php');
        $oAdminConfigDao = AdminConfigDao::singleton($autoload);
        return $oAdminConfigDao;
    }

	public static function Picture($autoload=false)
    {
        require_once('SitebuilderDao/PictureDao.php');
        $oPictureDao = PictureDao::singleton($autoload);
        return $oPictureDao;
    }

	public static function ProjectLayoutPage($autoload=false)
    {
        require_once('SitebuilderDao/ProjectLayoutPageDao.php');
        $oProjectLayoutPageDao = ProjectLayoutPageDao::singleton($autoload);
        return $oProjectLayoutPageDao;
    }

	public static function Side($autoload=false)
    {
        require_once('SitebuilderDao/SideDao.php');
        $oSideDao = SideDao::singleton($autoload);
        return $oSideDao;
    }

	public static function Font($autoload=false)
    {
        require_once('SitebuilderDao/FontDao.php');
        $oFontDao = FontDao::singleton($autoload);
        return $oFontDao;
    }

	public static function Link($autoload=false)
    {
        require_once('SitebuilderDao/LinkDao.php');
        $oLinkDao = LinkDao::singleton($autoload);
        return $oLinkDao;
    }

    public static function Tryout($autoload=false)
    {
        require_once('SitebuilderDao/TryoutDao.php');
        $oLinkDao = TryoutDao::singleton($autoload);
        return $oLinkDao;
    }

    public static function Block($autoload=false)
    {
    	require_once('SitebuilderDao/BlockDao.php');
        $oBlockDao = BlockDao::singleton($autoload);
        return $oBlockDao;
    }


    public static function widget($autoload=false)
    {
    	require_once('SitebuilderDao/widgetDao.php');
    	$oWidgetDao = widgetDao::singleton($autoload);
    	return $oWidgetDao;
    }

    public static function getClassMethods($class = null)
    {
    	$aMethods = array('Usr', 'Project', 'ProjectPage', 'Navigator', 'Color', 'Category', 'Charset',
       'Component', 'OutSuggestion', 'Template', 'TemplateImport', 'LayoutTemplate', 'FlashOnline',
       'OnlineForm', 'Jotform', 'OnlineCounter', 'Publish', 'InternalPage', 'AdminConfig','Picture',
       'ProjectLayoutPage', 'Side', 'Font', 'Link', 'Tryout');

    	$p = SGL_MOD_DIR . '/sitebuilder/classes/SitebuilderDao';
    	$aList = rvsLibs_System::ls(array($p), $aDirIgnore = array('SitebuilderInf.php', 'DbWrapper.php'));
    	$aMethods2 = array();
    	foreach ($aList['files'] as $path) {
    		$fileName = end(RvsLibs_String::dbeExplode('/', $path));
    		if (RvsLibs_String::preg_match('/(\w+)Dao.php$/i', $fileName, $aMatch)) {
    			$aMethods2[] = $aMatch[1];
    		}
    	}
        return (count($aMethods2)) ? $aMethods2 : $aMethods;
        /// Have Problem in local1 :: BooM
        /*return get_class_methods(new $class);*/
    }
}
?>

Copyright 2K16 - 2K18 Indonesian Hacker Rulez