<?php /************************************************** * PHP DEBUGGER **************************************************/ /************************************************** * @package phpDebugger * @subpackage core * @version 1.01 * @build 1042 **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ Application::import('core.debugger.DebuggerConnection'); class Debugger { private $session; /** * @param string $_level * @return unknown_type */ function __construct() { $this->session = $this->getSession(); } /** * @param string $_identifier * @param string $_value * @return unknown_type
<?php /** * Dependencies */ Application::import('request::router::routeconfig'); /** * */ class Router { public function __construct(RouteConfig $config) { } }
* @subpackage controller **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ /************************************************** * $Id: Connection.class.php 803 2010-05-20 13:47:08Z webadmin $ * $HeadURL: http://svn.rm-keil.de/rm-keil/webpages/rm-keil.de/Release%20(1.0)/httpdocs/_app/core/database/controller/Connection.class.php $ * $Date: 2010-05-20 15:47:08 +0200 (Do, 20 Mai 2010) $ * $Author: webadmin $ * $Revision: 803 $ **************************************************/ Application::import('core.database.controller.Host'); Application::import('core.database.controller.Credential'); Application::import('core.database.exception.*'); class Connection { private $connection; private $logger; /** * @param Host $_host * @param string $_database * @param Credential $_credential * @param Logger $_logger */ function __construct(Host $_host, $_database, Credential $_credential, Logger $_logger = null) { $this->logger = $_logger; $this->connection = mysql_connect($_host->getHost(), $_credential->getUsername(), $_credential->getPassword(), true); if (!$this->connection) {
/************************************************** * @package phpDBI * @subpackage exception **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ /************************************************** * $Id: UndefinedException.class.php 803 2010-05-20 13:47:08Z webadmin $ * $HeadURL: http://svn.rm-keil.de/rm-keil/webpages/rm-keil.de/Release%20(1.0)/httpdocs/_app/core/database/exception/UndefinedException.class.php $ * $Date: 2010-05-20 15:47:08 +0200 (Do, 20 Mai 2010) $ * $Author: webadmin $ * $Revision: 803 $ **************************************************/ Application::import('core.database.exception.DatabaseException'); /** * UndefinedException */ class UndefinedException extends DatabaseException { /** * @param string $message * @param number $code * @param Exception $previous */ function __construct($message = null, $code = 0, Exception $previous = null) { parent::__construct('undefined exception: ' . $message, $code, $previous); } }
<?php /** * Dependencies */ Application::import('text::text'); Application::import('text::stringparser::stringparser_bbcode'); Application::import('text::geshi::geshi'); Application::import('view::template'); /** * */ class BBCode { private $bbcodes; private $smileys; private $lang; private $templates; /** * constructs the bbcode parser * * @access public * @param string[][] $bbcodes the bbcodes to user * @param string[] $smiles the smileys to use */ public function __construct($bbcodes, $smileys = array(), $lang = array()) { if (!is_array($bbcodes) || !is_array($smileys)) { throw new Exception('BBCode::__construct: the bbcodes and smileys have to be passed as arrays!'); } $this->bbcodes = $bbcodes;
/************************************************** * PHP DEBUGGER **************************************************/ /************************************************** * @package phpDebugger * @subpackage core * @version 1.01 * @build 1042 **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ Application::import('config.debugger'); Application::import('core.debugger.Debugger'); class DebuggerFactory { /** * @var Debugger */ private static $debugger = null; /** * @param string $_level * @return unknown_type */ static function getInstance() { if (!isset(DebuggerFactory::$debugger)) { DebuggerFactory::$debugger = new Debugger(); }
<?php /** * Dependencies */ Application::import('data::statictypes::abstractstatictype'); class StaticDouble extends AbstractStaticType { protected static $type = 'double'; public function __construct($value, $convert = false) { self::$type = 'double'; $this->setValue($value, $convert); } protected function convert(&$value) { $value = doubleval($value); } }
**************************************************/ /************************************************** * @package phpDBI * @subpackage condition **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ /************************************************** * $Id: LtCondition.class.php 803 2010-05-20 13:47:08Z webadmin $ * $HeadURL: http://svn.rm-keil.de/rm-keil/webpages/rm-keil.de/Release%20(1.0)/httpdocs/_app/core/database/condition/LtCondition.class.php $ * $Date: 2010-05-20 15:47:08 +0200 (Do, 20 Mai 2010) $ * $Author: webadmin $ * $Revision: 803 $ **************************************************/ Application::import('core.database.condition.Condition'); /** * LtCondition */ class LtCondition extends Condition { /** * @param $_key * @param $_value */ function __construct($_key, $_value) { parent::__construct($_key, '<', $_value); } }
/************************************************** * @package phpDBI * @subpackage exception **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ /************************************************** * $Id: UndefinedRowException.class.php 803 2010-05-20 13:47:08Z webadmin $ * $HeadURL: http://svn.rm-keil.de/rm-keil/webpages/rm-keil.de/Release%20(1.0)/httpdocs/_app/core/database/exception/UndefinedRowException.class.php $ * $Date: 2010-05-20 15:47:08 +0200 (Do, 20 Mai 2010) $ * $Author: webadmin $ * $Revision: 803 $ **************************************************/ Application::import('core.database.exception.UndefinedException'); /** * UndefinedRowException */ class UndefinedRowException extends UndefinedException { /** * @param string $row * @param number $code * @param Exception $previous */ function __construct($row = null, $code = 0, Exception $previous = null) { parent::__construct('undefined row: ' . $row, $code, $previous); } }
/************************************************** * PHP DATABASE INTERFACE **************************************************/ /************************************************** * @package phpDBI * @subpackage adapter **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ /************************************************** * $Id: DatabaseAdapter.class.php 803 2010-05-20 13:47:08Z webadmin $ * $HeadURL: http://svn.rm-keil.de/rm-keil/webpages/rm-keil.de/Release%20(1.0)/httpdocs/_app/core/database/adapter/DatabaseAdapter.class.php $ * $Date: 2010-05-20 15:47:08 +0200 (Do, 20 Mai 2010) $ * $Author: webadmin $ * $Revision: 803 $ **************************************************/ Application::import('core.database.controller.Connection'); /** * DatabaseAdapter */ interface DatabaseAdapter { /** * @param Connection $_connection * @param Logger $_logger = null * @return unknown_type */ public function assign(Connection $_connection, Logger $_logger = null); }
* @subpackage model **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ /************************************************** * $Id: Database.class.php 803 2010-05-20 13:47:08Z webadmin $ * $HeadURL: http://svn.rm-keil.de/rm-keil/webpages/rm-keil.de/Release%20(1.0)/httpdocs/_app/core/database/model/Database.class.php $ * $Date: 2010-05-20 15:47:08 +0200 (Do, 20 Mai 2010) $ * $Author: webadmin $ * $Revision: 803 $ **************************************************/ Application::import('core.database.controller.*'); Application::import('core.database.exception.*'); Application::import('core.database.model.Table'); /** * Database */ class Database { /** * @var Connection */ private $connection; /** * @var Logger */ private $logger; /** * @param Host $_host
* @subpackage model **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ /************************************************** * $Id: Table.class.php 803 2010-05-20 13:47:08Z webadmin $ * $HeadURL: http://svn.rm-keil.de/rm-keil/webpages/rm-keil.de/Release%20(1.0)/httpdocs/_app/core/database/model/Table.class.php $ * $Date: 2010-05-20 15:47:08 +0200 (Do, 20 Mai 2010) $ * $Author: webadmin $ * $Revision: 803 $ **************************************************/ Application::import('core.database.controller.Connection'); Application::import('core.database.exception.*'); Application::import('core.database.model.Row'); /** * Table */ class Table { /** * @var string */ private $primary; /** * @var string */ private $table; /** * @var Connection
<?php /************************************************** * PHP DEBUGGER **************************************************/ /************************************************** * @package phpDebugger * @subpackage core * @version 1.01 * @build 1042 **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ Application::import('config.debugger'); class DebuggerConnection { /** * @var unknown_type */ private $connection; /** * @return unknown_type */ function __construct() { $this->connection = mysql_connect(DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD) or die(": " . mysql_error()); mysql_select_db(DATABASE) or die(": " . mysql_error()); } /**
<?php /************************************************** * PHP LOGGER **************************************************/ /************************************************** * @package phpLogger * @subpackage core * @version 2.01 * @build 1054 **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ Application::import('config.logger'); class LoggerConnection { /** * @var unknown_type */ private $connection; /** * @return unknown_type */ function __construct() { $this->connection = mysql_connect(DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD, true) or die(": " . mysql_error()); mysql_select_db(DATABASE) or die(": " . mysql_error()); } /**
/************************************************** * PHP LOGGER **************************************************/ /************************************************** * @package phpLogger * @subpackage core * @version 2.01 * @build 1054 **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ Application::import('core.logger.Level'); Application::import('core.logger.LoggerConnection'); class Logger { /** * @var int */ private $session; /** * @var unknown_type */ private $level; /** * @param string $_level * @return unknown_type */ function __construct($_level)
/************************************************** * PHP LOGGER **************************************************/ /************************************************** * @package phpLogger * @subpackage core * @version 2.01 * @build 1054 **************************************************/ /************************************************** * @author: Roman Matthias Keil * @copyright: Roman Matthias Keil **************************************************/ Application::import('config.debugger'); Application::import('core.logger.Logger'); class LoggerFactory { /** * @var Logger */ private static $logger; /** * @param string $_level * @return unknown_type */ static function getInstance($_level = null) { if (!isset(LoggerFactory::$logger)) { if (isset($_level)) { LoggerFactory::$logger = new Logger($_level);