当前位置: 首页>>代码示例>>PHP>>正文


PHP Application::import方法代码示例

本文整理汇总了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
开发者ID:keil,项目名称:phpDebugger,代码行数:31,代码来源:Debugger.class.php

示例2: __construct

<?php

/**
 * Dependencies
 */
Application::import('request::router::routeconfig');
/**
 *
 */
class Router
{
    public function __construct(RouteConfig $config)
    {
    }
}
开发者ID:GamerSource,项目名称:Infected-CMS-2,代码行数:15,代码来源:router.php

示例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) {
开发者ID:keil,项目名称:phpDBI-MySQL-Database-Interface-,代码行数:31,代码来源:Connection.class.php

示例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);
    }
}
开发者ID:keil,项目名称:phpDBI-MySQL-Database-Interface-,代码行数:31,代码来源:UndefinedException.class.php

示例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;
开发者ID:GamerSource,项目名称:Infected-CMS-2,代码行数:31,代码来源:bbcode.php

示例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();
        }
开发者ID:keil,项目名称:phpDebugger,代码行数:30,代码来源:DebuggerFactory.class.php

示例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);
    }
}
开发者ID:GamerSource,项目名称:Infected-CMS-2,代码行数:19,代码来源:staticdouble.php

示例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);
    }
}
开发者ID:keil,项目名称:phpDBI-MySQL-Database-Interface-,代码行数:31,代码来源:LtCondition.class.php

示例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);
    }
}
开发者ID:keil,项目名称:phpDBI-MySQL-Database-Interface-,代码行数:31,代码来源:UndefinedRowException.class.php

示例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);
}
开发者ID:keil,项目名称:phpDBI-MySQL-Database-Interface-,代码行数:31,代码来源:DatabaseAdapter.class.php

示例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
开发者ID:keil,项目名称:phpDBI-MySQL-Database-Interface-,代码行数:31,代码来源:Database.class.php

示例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
开发者ID:keil,项目名称:phpDBI-MySQL-Database-Interface-,代码行数:31,代码来源:Table.class.php

示例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());
    }
    /**
开发者ID:keil,项目名称:phpDebugger,代码行数:31,代码来源:DebuggerConnection.class.php

示例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());
    }
    /**
开发者ID:keil,项目名称:phpLogger,代码行数:31,代码来源:LoggerConnection.class.php

示例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)
开发者ID:keil,项目名称:phpLogger,代码行数:30,代码来源:Logger.class.php


注:本文中的Application::import方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。