public function __construct() { try { Snep_Config::setConfigFile(APPLICATION_PATH . '/includes/setup.conf'); } catch (Exception $ex) { fwrite(STDERR, sprintf($ex->getMessage())); exit(1); } $this->startLogger(); defined('SNEP_VERSION') || define('SNEP_VERSION', file_get_contents(APPLICATION_PATH . "/configs/snep_version")); $this->startLocale(); $this->startModules(); $this->updateRequest(); require_once "Zend/Loader/Autoloader.php"; Zend_Loader_Autoloader::getInstance()->registerNamespace(array("Snep_", "PBX_", "Asterisk_")); }
* * SNEP 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with SNEP. If not, see <http://www.gnu.org/licenses/>. */ // Define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__))); // Add standard library to the include path set_include_path(implode(PATH_SEPARATOR, array(APPLICATION_PATH . '/lib', get_include_path()))); // Initializing Snep Config require_once "Snep/Config.php"; Snep_Config::setConfigFile(APPLICATION_PATH . '/includes/setup.conf'); $config = Snep_Config::getConfig(); defined('SNEP_VENDOR') || define('SNEP_VENDOR', $config->ambiente->emp_nome); defined('SNEP_VERSION') || define('SNEP_VERSION', trim(file_get_contents(APPLICATION_PATH . "/configs/snep_version"))); // Define application environment $snep_env = Snep_Config::getConfig()->system->debug ? "development" : "production"; defined('APPLICATION_ENV') || define('APPLICATION_ENV', getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : $snep_env); if (APPLICATION_ENV === "development") { require_once "Zend/Debug.php"; } // Adds the modules directory to the snep module system require_once "Snep/Modules.php"; Snep_Modules::getInstance()->addPath(APPLICATION_PATH . "/modules"); /** Zend_Application */ require_once 'Zend/Application.php'; require_once 'Zend/Config/Ini.php';