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


PHP prado::using方法代码示例

本文整理汇总了PHP中prado::using方法的典型用法代码示例。如果您正苦于以下问题:PHP prado::using方法的具体用法?PHP prado::using怎么用?PHP prado::using使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在prado的用法示例。


在下文中一共展示了prado::using方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createApiProvider

 /**
  * Creates the API provider instance for the current request
  * @param TRpcProtocol $protocolHandler instance
  * @param string $providerId
  */
 public function createApiProvider(TRpcProtocol $protocolHandler, $providerId)
 {
     $_properties = $this->apiProviders[$providerId];
     if (($_providerClass = $_properties->remove('class')) === null) {
         throw new TConfigurationException('rpcservice_apiprovider_required');
     }
     prado::using($_providerClass);
     $_providerClassName = ($_pos = strrpos($_providerClass, '.')) !== false ? substr($_providerClass, $_pos + 1) : $_providerClass;
     if (!is_subclass_of($_providerClassName, self::BASE_API_PROVIDER)) {
         throw new TConfigurationException('rpcservice_apiprovider_invalid');
     }
     if (($_rpcServerClass = $_properties->remove('server')) === null) {
         $_rpcServerClass = self::BASE_RPC_SERVER;
     }
     prado::using($_rpcServerClass);
     $_rpcServerClassName = ($_pos = strrpos($_rpcServerClass, '.')) !== false ? substr($_rpcServerClass, $_pos + 1) : $_rpcServerClass;
     if (!is_subclass_of($_rpcServerClassName, self::BASE_RPC_SERVER)) {
         throw new TConfigurationException('rpcservice_rpcserver_invalid');
     }
     $_apiProvider = new $_providerClassName(new $_rpcServerClassName($protocolHandler));
     $_apiProvider->setId($providerId);
     foreach ($_properties as $_key => $_value) {
         $_apiProvider->setSubProperty($_key, $_value);
     }
     return $_apiProvider;
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:31,代码来源:TRpcService.php

示例2: getInstanceOfClass

 /**
  * get instance of 
  *
  */
 public function getInstanceOfClass($className)
 {
     switch ($className) {
         case 'Users':
             prado::using('Application.logic.Logic_Users');
             return new Logic_Users($this->db);
             break;
         case 'Penanggalan':
             prado::using('Application.logic.Logic_Penanggalan');
             return new Logic_Penanggalan($this->db);
             break;
         case 'Setup':
             prado::using('Application.logic.Logic_Setup');
             return new Logic_Setup($this->db);
             break;
         case 'DMaster':
             prado::using('Application.logic.Logic_DMaster');
             return new Logic_DMaster($this->db);
             break;
         case 'Obat':
             prado::using('Application.logic.Logic_Obat');
             return new Logic_Obat($this->db);
             break;
         case 'Report':
             prado::using('Application.logic.Logic_Report');
             return new Logic_Report($this->db);
             break;
         default:
             throw new Exception("Logic_Factory.php :: {$className} tidak di ketahui");
     }
 }
开发者ID:silotester,项目名称:silo,代码行数:35,代码来源:LogicFactory.php

示例3: linkOpen

 /**
  * digunakan untuk membuka koneksi ke server, dan memilih database
  *
  */
 private function linkOpen()
 {
     $this->prepareParameters();
     switch ($this->DbType) {
         case 'postgres':
             prado::using('Application.lib.Database.PostgreSQL');
             $this->Link = new PostgreSQL();
             $config = array("host" => $this->Host, "port" => $this->DbPort, "user" => $this->UserName, "password" => $this->UserPassword, "dbname" => $this->DbName);
             break;
         case 'mysql':
             prado::using('Application.lib.Database.MySQL');
             $this->Link = new MySQL();
             $config = array("host" => $this->Host, "user" => $this->UserName, "password" => $this->UserPassword, "dbname" => $this->DbName);
             break;
         default:
             throw new Exception('No Driver Found.');
     }
     $this->Link->connectDB($config);
 }
开发者ID:silotester,项目名称:silo,代码行数:23,代码来源:DBFactory.php

示例4: __construct

<?php

/**
*
* digunakan untuk memproses setup aplikasi
*
*/
prado::using('Application.logic.Logic_Global');
class Logic_Setup extends Logic_Global
{
    /**
     *
     * setting application
     */
    private $settings;
    /**
     *
     * file parameters xpath
     */
    private $parameters;
    public function __construct($db)
    {
        parent::__construct($db);
        $this->loadSetting();
        $this->parameters = $this->Application->getParameters();
    }
    /**
     * digunakan untuk meload setting
     */
    public function loadSetting($flush = false)
    {
开发者ID:silotester,项目名称:silo,代码行数:31,代码来源:Logic_Setup.php

示例5:

<?php

prado::using('Application.Logic.Logic_Obat');
class Logic_Report extends Logic_Obat
{
    /**
     * mode dari driver
     *
     */
    private $driver;
    /**
     * object dari driver2 report misalnya PHPExcel, TCPDF, dll.
     *
     */
    public $rpt;
    /**
     * object setup;	
     */
    public $setup;
    /**
     * object tanggal;	
     */
    public $tgl;
    /**
     * Exported Dir
     *
     */
    private $exportedDir;
    /**
     * posisi row sekarang
     *
开发者ID:silotester,项目名称:silo,代码行数:31,代码来源:Logic_Report.php

示例6:

<?php

/**
 * TDbColumnSchema class file.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @link http://www.yiiframework.com/
 * @copyright Copyright &copy; 2008-2009 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */
prado::using('System.Testing.Data.Schema.TDbExpression');
/**
 * TDbColumnSchema class describes the column meta data of a database table.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @version $Id: TDbColumnSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $
 * @package System.Testing.Data.Schema
 * @since 1.0
 */
class TDbColumnSchema extends TComponent
{
    /**
     * @var string name of this column (without quotes).
     */
    public $name;
    /**
     * @var string raw name of this column. This is the quoted name that can be used in SQL queries.
     */
    public $rawName;
    /**
     * @var boolean whether this column can be null.
开发者ID:quantrocket,项目名称:planlogiq,代码行数:31,代码来源:TDbColumnSchema.php

示例7: onLoad

<?php

prado::using('Application.MainPageSA');
class PerpetualStock extends MainPageSA
{
    public $dataobat;
    public function onLoad($param)
    {
        parent::onLoad($param);
        $this->showSubMenuReportStock = true;
        $this->showReportPerpetualStock = true;
        $this->createObj('DMaster');
        $this->createObj('Obat');
        if (!$this->IsPostBack && !$this->IsCallBack) {
            if (isset($_SESSION['currentPagePerpetualStock']['dataobat']['idobat'])) {
                $this->detailProcess();
                $this->populateData();
            } else {
                if (!isset($_SESSION['currentPagePerpetualStock']) || $_SESSION['currentPagePerpetualStock']['page_name'] != 'sa.report.PerpetualStock') {
                    $_SESSION['currentPagePerpetualStock'] = array('page_name' => 'sa.report.PerpetualStock', 'page_num' => 0, 'search' => false, 'dataobat' => array());
                }
            }
        }
    }
    public function checkKodeObat($sender, $param)
    {
        $kode_obat = $param->Value;
        if ($kode_obat != '') {
            try {
                if (!$this->DB->checkRecordIsExist('kode_obat', 'master_obat', $kode_obat)) {
                    throw new Exception("Kode Obat ({$kode_obat}) tidak tersedia silahkan ganti dengan yang lain.");
开发者ID:silotester,项目名称:silo,代码行数:31,代码来源:PerpetualStock.php

示例8: onPreRender

<?php

/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 * Description of POrganisationSelection
 *
 * @author PFRENZ
 */
Prado::using('System.Web.UI.TTemplateControl');
prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter');
class PTimeSelection extends TTemplateControl implements IActiveControl, ICallbackEventHandler
{
    public function onPreRender($writer)
    {
        //$this->registerClientScripts();
    }
    public function __construct()
    {
        parent::__construct();
        $this->setAdapter(new TActiveControlAdapter($this));
    }
    /**
     * @return TBaseActiveControl basic active control options.
     */
    public function getActiveControl()
    {
        return $this->getAdapter()->getBaseActiveControl();
    }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:31,代码来源:PTimeSelection.php

示例9: findTableNames

<?php

/**
 * TSqliteSchema class file.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @link http://www.yiiframework.com/
 * @copyright Copyright &copy; 2008-2009 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */
prado::using('System.Testing.Data.Schema.TDbSchema');
prado::using('System.Testing.Data.Schema.TDbTableSchema');
prado::using('System.Testing.Data.Schema.sqlite.TSqliteColumnSchema');
prado::using('System.Testing.Data.Schema.sqlite.TSqliteCommandBuilder');
/**
 * TSqliteSchema is the class for retrieving metadata information from a SQLite (2/3) database.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @version $Id: TSqliteSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $
 * @package System.Testing.Data.Schema.sqlite
 * @since 1.0
 */
class TSqliteSchema extends TDbSchema
{
    /**
     * Returns all table names in the database.
     * @param string the schema of the tables. This is not used for sqlite database.
     * @return array all table names in the database.
     * @since 1.0.2
     */
    protected function findTableNames($schema = '')
开发者ID:quantrocket,项目名称:planlogiq,代码行数:31,代码来源:TSqliteSchema.php

示例10: getControlID

<?php

/**
 * TTriggeredCallback class file.
 *
 * @author Wei Zhuo <weizhuo[at]gamil[dot]com>
 * @link http://www.pradosoft.com/
 * @copyright Copyright &copy; 2005-2008 PradoSoft
 * @license http://www.pradosoft.com/license/
 * @version $Id: TTriggeredCallback.php 2713 2009-10-03 00:08:03Z rojaro $
 * @package System.Web.UI.ActiveControls
 */
prado::using('System.Web.UI.ActiveControls.TCallback');
/**
 * TTriggeredCallback abstract Class
 *
 * Base class for triggered callback controls. The {@link setControlID ControlID}
 * property sets the control ID to observe the trigger.
 *
 * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
 * @version $Id: TTriggeredCallback.php 2713 2009-10-03 00:08:03Z rojaro $
 * @package System.Web.UI.ActiveControls
 * @since 3.1
 */
abstract class TTriggeredCallback extends TCallback
{
    /**
     * @return string The ID of the server control the trigger is bounded to.
     */
    public function getControlID()
    {
开发者ID:quantrocket,项目名称:planlogiq,代码行数:31,代码来源:TTriggeredCallback.php

示例11: getSchema

 /**
  * @return TDbSchema the database schema for the current connection
  * @throws CException if the connection is not active yet
  */
 public function getSchema()
 {
     if ($this->_schema !== null) {
         return $this->_schema;
     } else {
         if (!$this->getActive()) {
             throw new TDbException('TDbConnection is inactive and cannot perform any DB operations.');
         }
         $driver = $this->getDriverName();
         switch (strtolower($driver)) {
             case 'pgsql':
                 // PostgreSQL
                 prado::using('System.Testing.Data.Schema.pgsql.TPgsqlSchema');
                 return $this->_schema = new TPgsqlSchema($this);
             case 'mysqli':
                 // MySQL
             // MySQL
             case 'mysql':
                 prado::using('System.Testing.Data.Schema.mysql.TMysqlSchema');
                 return $this->_schema = new TMysqlSchema($this);
             case 'sqlite':
                 // sqlite 3
             // sqlite 3
             case 'sqlite2':
                 // sqlite 2
                 prado::using('System.Testing.Data.Schema.sqlite.TSqliteSchema');
                 return $this->_schema = new TSqliteSchema($this);
             case 'mssql':
                 // Mssql driver on windows hosts
             // Mssql driver on windows hosts
             case 'dblib':
                 // dblib drivers on linux (and maybe others os) hosts
                 prado::using('System.Testing.Data.Schema.mssql.TMssqlSchema');
                 return $this->_schema = new TMssqlSchema($this);
             case 'oci':
                 // Oracle driver
                 prado::using('System.Testing.Data.Schema.oci.TOciSchema');
                 return $this->_schema = new TOciSchema($this);
             case 'ibm':
             default:
                 throw new TDbException('TDbConnection does not support reading schema for {0} database.', $driver);
         }
     }
 }
开发者ID:quantrocket,项目名称:planlogiq,代码行数:48,代码来源:TDbConnection.php

示例12:

<?php

/**
 * CMsCommandBuilder class file.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @author Christophe Boulain <Christophe.Boulain@gmail.com>
 * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
 * @link http://www.yiiframework.com/
 * @copyright Copyright &copy; 2008-2009 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */
prado::using('System.Testing.Data.schame.TDbCommandBuilder');
/**
 * TMssqlCommandBuilder provides basic methods to create query commands for tables for Mssql Servers.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @author Christophe Boulain <Christophe.Boulain@gmail.com>
 * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
 * @version $Id: TMssqlCommandBuilder.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $
 * @package System.Testing.Data.schema.mssql
 * @since 1.0.4
 */
class TMssqlCommandBuilder extends TDbCommandBuilder
{
    /**
     * Returns the last insertion ID for the specified table.
     * Override parent implemantation since PDO mssql driver does not provide this method
     * @param TDbTableSchema the table metadata
     * @return mixed last insertion id. Null is returned if no sequence name.
     */
开发者ID:quantrocket,项目名称:planlogiq,代码行数:31,代码来源:TMssqlCommandBuilder.php

示例13: clickToggleButton

<?php

/**
 *
 *
 * @author Christophe BOULAIN (Christophe.Boulain@ceram.fr)
 * @copyright Copyright &copy; 2007, CERAM Sophia Antipolis
 * @license url nameoflicense
 *
 */
prado::using('Application.pages.ExtendedToggleImageButton');
class Ticket659 extends TPage
{
    public function clickToggleButton($sender, $param)
    {
        $this->lbl->Text = $sender->State;
    }
}
开发者ID:Nurudeen,项目名称:prado,代码行数:18,代码来源:Ticket659.php

示例14:

<?php

/**
 * TSqliteCommandBuilder class file.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @link http://www.yiiframework.com/
 * @copyright Copyright &copy; 2008-2009 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */
prado::using('System.Testing.Data.Schema.TDbCommandBuilder');
/**
 * TSqliteCommandBuilder provides basic methods to create query commands for SQLite tables.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @version $Id: TSqliteCommandBuilder.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $
 * @package System.Testing.Data.Schema.sqlite
 * @since 1.0
 */
class TSqliteCommandBuilder extends TDbCommandBuilder
{
    /**
     * Generates the expression for selecting rows with specified composite key values.
     * This method is overridden because SQLite does not support the default
     * IN expression with composite columns.
     * @param TDbTableSchema the table schema
     * @param array list of primary key values to be selected within
     * @param string column prefix (ended with dot)
     * @return string the expression for selection
     * @since 1.0.4
     */
开发者ID:quantrocket,项目名称:planlogiq,代码行数:31,代码来源:TSqliteCommandBuilder.php

示例15: onLoad

<?php

prado::using('System.Web.UI.ActiveControls.*');
class Ticket679 extends TPage
{
    // repeater bug
    public function onLoad($param)
    {
        parent::onLoad($param);
        $dataArray[0]['id'] = '1';
        if (!$this->Page->IsPostBack && !$this->Page->IsCallBack) {
            $this->Repeater->DataSource = $dataArray;
            $this->Repeater->dataBind();
        }
    }
    public function changeText($sender, $param)
    {
        $obj = $this->myLabel;
        $obj->Text = $sender->Text;
        $obj->Display = "Dynamic";
        // solution
        //$this->CallBackClient->show($obj, true);
    }
    // activeradiobutton bug
    public function checkRadioButton($sender, $param)
    {
        $this->myRadioButton->checked = true;
    }
    public function uncheckRadioButton($sender, $param)
    {
        $this->myRadioButton->checked = false;
开发者ID:Nurudeen,项目名称:prado,代码行数:31,代码来源:Ticket679.php


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