/* Yellow Duck Framework version 2.1 (c) Copyright 2002-2007 Pieter Claerhout This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** * @addtogroup YDFramework Core */ // Check if the framework is loaded if (!defined('YD_FW_NAME')) { die('Yellow Duck Framework is not loaded.'); } // Auto execute config value. Default: true. YDConfig::set('YD_AUTO_EXECUTE', true, false); // Check if we need to auto execute if (YDConfig::get('YD_AUTO_EXECUTE', true) == true) { $clsInst = new YDExecutor(YD_SELF_FILE); @session_start(); $clsInst->execute(); }
/** * This is a static function that will run a request. * * @param $scope The scope in which the request needs to run. You can choose between * YD_SIMPLECMS_SCOPE_PUBLIC and YD_SIMPLECMS_SCOPE_ADMIN. If you choose * YD_SIMPLECMS_SCOPE_ADMIN, authentication will be enforced, with YD_SIMPLECMS_SCOPE_PUBLIC, * it's not. * * @static */ function run($scope) { YDSimpleCMS::setVar('scope', $scope); $clsInst = new YDExecutor('YDSimpleCMSRequest.php'); @session_start(); $clsInst->execute(); }