<?php module("Console application base files"); // Console applications or services shouldn't time out set_time_limit(0); using('lepton.cli.debug'); using('lepton.cli.exception'); using('lepton.system.process'); using('lepton.cli.ansi'); logger::registerFactory(new ConsoleLoggerFactory()); abstract class AppBaseList implements IteratorAggregate, ArrayAccess { protected $data; public function __construct() { $this->data = array(); } public function getData() { return $this->data; } public function getIterator() { return new ArrayIterator($this->data); } public function offsetSet($offset, $value) { if (is_null($offset)) { $this->data[] = $value; } else { $this->data[$offset] = $value;
// Charset to use config::set('lepton.charset', 'utf-8'); // The default router instance config::set('lepton.mvc.router', 'DefaultRouter'); // Syslog configuration config::set('lepton.debug.syslog', false); config::set('lepton.debug.syslog.facility', LOG_DAEMON); // Will use LOG_USER on Windows platforms config::set('lepton.debug.syslog.level', null); // Highest debug level to save config::set('lepton.debug.syslog.tee', null); // Tee to a file // Loggers. Set first parameter of constructor to true to echo errors to // stderr, parameter two can be used to set the target facility. logger::registerFactory(new SyslogLoggerFactory()); logger::registerFactory(new EventLoggerFactory()); // You can also register a DatabaseLoggerFacility: // logger::registerFactory(new DatabaseLoggerFacility("logtable")); // If true, debug information will be shown when an unhandled exception // occurs. config::set('lepton.mvc.exception.showdebug', true); // If true, the feedback form will be displayed. This requires either log, // db or email below to be enabled. config::set('lepton.mvc.exception.feedback', false); // Save exceptions to a logfile. If true, specify filename or leave as // null. Default filename is /tmp/HOSTNAME-debug.log config::set('lepton.mvc.exception.log', false); config::set('lepton.mvc.exception.logfile', null); // Send exception information via e-mail. Requires an e-mail transport to // be enabled. config::set('lepton.mvc.exception.email', false);