本文整理汇总了PHP中Application::import方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::import方法的具体用法?PHP Application::import怎么用?PHP Application::import使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Application
的用法示例。
在下文中一共展示了Application::import方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?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
示例2: __construct
<?php
/**
* Dependencies
*/
Application::import('request::router::routeconfig');
/**
*
*/
class Router
{
public function __construct(RouteConfig $config)
{
}
}
示例3:
* @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) {
示例4:
/**************************************************
* @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);
}
}
示例5: __construct
<?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;
示例6: getInstance
/**************************************************
* 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();
}
示例7: __construct
<?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);
}
}
示例8:
**************************************************/
/**************************************************
* @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);
}
}
示例9:
/**************************************************
* @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);
}
}
示例10: assign
/**************************************************
* 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);
}
示例11:
* @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
示例12:
* @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
示例13: die
<?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());
}
/**
示例14: die
<?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());
}
/**
示例15:
/**************************************************
* 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)