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


PHP PEAR::getStaticProperty方法代码示例

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


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

示例1: array

 /**
  * Constructeur de bbCodeObject
  *
  * @param array $params Param�tres
  *
  * @return void
  * */
 function __construct($params = array())
 {
     parent::__construct();
     if (!in_array('noPEAR', $params)) {
         $config = parse_ini_file('BBCodeParser.ini', true);
         $pear = new PEAR();
         $options = $pear->getStaticProperty('HTML_BBCodeParser', '_options');
         $options = $config['HTML_BBCodeParser'];
         $this->parserBB = new HTML_BBCodeParser2($options);
     }
 }
开发者ID:archi-strasbourg,项目名称:archi-wiki,代码行数:18,代码来源:bbCodeObject.class.php

示例2: ic2_loadconfig

/**
 * ユーザ設定読み込み関数
 *
 * @param void
 * @return array
 */
function ic2_loadconfig()
{
    static $ini = null;
    if (is_null($ini)) {
        $_conf = $GLOBALS['_conf'];
        include P2_CONFIG_DIR . '/conf_ic2.inc.php';
        $ini = array();
        $_ic2conf = preg_grep('/^expack\\.ic2\\.\\w+\\.\\w+$/', array_keys($_conf));
        foreach ($_ic2conf as $key) {
            $p = explode('.', $key);
            $cat = ucfirst($p[2]);
            $name = $p[3];
            if (!isset($ini[$cat])) {
                $ini[$cat] = array();
            }
            $ini[$cat][$name] = $_conf[$key];
        }
        // DB_DataObjectの設定
        $_dao_options =& PEAR::getStaticProperty('DB_DataObject', 'options');
        if (!is_array($_dao_options)) {
            $_dao_options = array();
        }
        $_dao_options['database'] = $ini['General']['dsn'];
        $_dao_options['debug'] = false;
        $_dao_options['quote_identifiers'] = true;
        $_dao_options['db_driver'] = 'DB';
    }
    return $ini;
}
开发者ID:xingskycn,项目名称:p2-php,代码行数:35,代码来源:bootstrap.php

示例3: connectToDatabase

 /**
  * Connect to the database.
  *
  * @return void
  * @access public
  */
 public static function connectToDatabase()
 {
     global $configArray;
     if (!defined('DB_DATAOBJECT_NO_OVERLOAD')) {
         define('DB_DATAOBJECT_NO_OVERLOAD', 0);
     }
     $options =& PEAR::getStaticProperty('DB_DataObject', 'options');
     // If we're using PostgreSQL, we need to set up some extra configuration
     // settings so that unique ID sequences are properly registered:
     if (substr($configArray['Database']['database'], 0, 5) == 'pgsql') {
         $tables = array('comments', 'oai_resumption', 'resource', 'resource_tags', 'search', 'session', 'tags', 'user', 'user_list', 'user_resource');
         foreach ($tables as $table) {
             $configArray['Database']['sequence_' . $table] = $table . '_id_seq';
         }
     }
     $options = $configArray['Database'];
     if (substr($configArray['Database']['database'], 0, 5) == 'mysql') {
         // If we're using MySQL, we need to make certain adjustments (ANSI
         // quotes, pipes as concatenation operator) for proper compatibility
         // with code built for other database systems like PostgreSQL or Oracle.
         $obj = new DB_DataObject();
         $conn = $obj->getDatabaseConnection();
         $conn->query("SET @@SESSION.sql_mode='ANSI_QUOTES,PIPES_AS_CONCAT'");
         $conn->query("SET NAMES UTF8");
     } else {
         if (substr($configArray['Database']['database'], 0, 4) == 'oci8') {
             // If we are using Oracle, set some portability values:
             $temp_db = new DB_DataObject();
             $db =& $temp_db->getDatabaseConnection();
             $db->setOption('portability', DB_PORTABILITY_NUMROWS | DB_PORTABILITY_NULL_TO_EMPTY);
             // Update the date format to fix issues with Oracle being evil
             $db->query("ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS'");
         }
     }
 }
开发者ID:bharatm,项目名称:NDL-VuFind,代码行数:41,代码来源:ConnectionManager.php

示例4: __construct

 /**
  *
  * Constructor
  *
  * @param $module	name of the requested module
  * @param $action	name of the requested action
  * @param $params	Optional parameters
  */
 function __construct($module = 'defaut', $action = 'index', $params = null)
 {
     $this->module = $module ? $module : 'defaut';
     $this->action = $action ? $action : 'index';
     $this->params = $params;
     $this->setConfig(PEAR::getStaticProperty('Dispatcher', 'global'));
 }
开发者ID:demental,项目名称:m,代码行数:15,代码来源:Dispatcher.php

示例5: CachedFeed

 function CachedFeed($uri)
 {
     $this->uri = $uri;
     $config = parse_ini_file(dirname(dirname(__FILE__)) . '/configs/db.ini');
     $options =& PEAR::getStaticProperty('DB_DataObject', 'options');
     $options = $config;
 }
开发者ID:komagata,项目名称:plnet,代码行数:7,代码来源:CachedFeed.php

示例6: tree

 public function tree($modules = null)
 {
     if (is_null($modules)) {
         $modules = $this->getOption('modulesToList');
     }
     $officeConfig = PEAR::getStaticProperty('m_office', 'options');
     $moduleconf = $officeConfig['modules'];
     $diff = array_diff(array_keys($_GET), array('module'));
     $o = array();
     foreach ($modules as $id => $module) {
         if (is_array($module)) {
             if (!can('tab', $id)) {
                 continue;
             }
             $res = array('name' => $id, 'icon' => $moduleconf[$id]['icon']);
             $res['submodules'] = $this->tree($module);
             if (in_array($_REQUEST['module'], $module)) {
                 $res['expanded'] = true;
             }
         } else {
             if (!can('tab', $module)) {
                 continue;
             }
             $res = array('name' => $module, 'icon' => $moduleconf[$module]['icon'], 'url' => M_Office::URL($module, array(), $diff));
             if ($_REQUEST['module'] == $module || $_REQUEST['module'] == $module . 'helper') {
                 $res['active'] = true;
             }
         }
         $o[] = $res;
     }
     return $o;
 }
开发者ID:demental,项目名称:m,代码行数:32,代码来源:ChooseTable.php

示例7: initialize

 /**
  * initialize DataObject.ini
  *
  * @access private
  */
 function initialize()
 {
     global $dbo_options;
     include_once 'DB/DataObject.php';
     $options =& PEAR::getStaticProperty("DB_DataObject", "options");
     $options = $dbo_options;
 }
开发者ID:komagata,项目名称:plnet,代码行数:12,代码来源:DBUtils.php

示例8: dataObject

 function dataObject()
 {
     /* Configuración de PEAR */
     $options =& PEAR::getStaticProperty('DB_DataObject', 'options');
     $options = array('debug' => Moe::$config['DEBUG_PEAR'], 'database' => "mysql://" . Moe::$config['DATABASE']['USER'] . ":" . Moe::$config['DATABASE']['PASSWORD'] . "@" . Moe::$config['DATABASE']['SERVER'] . "/" . Moe::$config['DATABASE']['DBNAME'], 'schema_location' => '../models', 'class_location' => '../models', 'require_prefix' => 'db/', 'class_prefix' => 'DataObjects_', 'db_driver' => 'MDB2', 'generate_links' => true, 'quote_identifiers' => true, 'build_views' => true, 'generator_no_ini' => true);
     return $options;
 }
开发者ID:julianbarrerar,项目名称:Moe-Framework,代码行数:7,代码来源:configuration.php

示例9: strtoupper

 public function &factory($driver = 'SIPS')
 {
     $driver = strtoupper($driver);
     $className = 'Payment_Driver_' . $driver;
     $options = PEAR::getStaticProperty('Payment_process', 'options');
     return new $className($options);
 }
开发者ID:demental,项目名称:m,代码行数:7,代码来源:Payment.php

示例10: setUp

 public function setUp()
 {
     // Setup Local Database Connection
     define('DB_DATAOBJECT_NO_OVERLOAD', 0);
     $options =& PEAR::getStaticProperty('DB_DataObject', 'options');
     $configurationReader = new ConfigurationReader();
     $options = $configurationReader->readConfiguration('Database');
 }
开发者ID:bryandease,项目名称:VuFind-Plus,代码行数:8,代码来源:LDAPAuthenticationTest.php

示例11: init

 /**
  * initialize the DAO object
  *
  * @param string $dsn   the database connection string
  *
  * @return void
  * @access private
  */
 function init($dsn)
 {
     $options =& PEAR::getStaticProperty('DB_DataObject', 'options');
     $options['database'] = $dsn;
     if (defined('CIVICRM_DAO_DEBUG')) {
         self::DebugLevel(CIVICRM_DAO_DEBUG);
     }
 }
开发者ID:bhirsch,项目名称:voipdev,代码行数:16,代码来源:DAO.php

示例12: _preparse

 /**
  * Executes statements before the actual array building starts
  *
  * This method should be overwritten in a filter if you want to do
  * something before the parsing process starts. This can be useful to
  * allow certain short alternative tags which then can be converted into
  * proper tags with preg_replace() calls.
  * The main class walks through all the filters and and calls this
  * method if it exists. The filters should modify their private $_text
  * variable.
  *
  * @return   none
  * @access   private
  * @see      $_text
  * @author   Stijn de Reede  <sjr@gmx.co.uk>
  */
 function _preparse()
 {
     $options = PEAR::getStaticProperty('HTML_BBCodeParser', '_options');
     $o = $options['open'];
     $c = $options['close'];
     $oe = $options['open_esc'];
     $ce = $options['close_esc'];
     $this->_preparsed = preg_replace("!" . $oe . "img(" . $ce . "|\\s.*" . $ce . ")(.*)" . $oe . "/img" . $ce . "!Ui", $o . "img=\\2\\1" . $o . "/img" . $c, $this->_text);
 }
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:25,代码来源:Images.php

示例13: _preparse

 /**
  * Executes statements before the actual array building starts
  *
  * This method should be overwritten in a filter if you want to do
  * something before the parsing process starts. This can be useful to
  * allow certain short alternative tags which then can be converted into
  * proper tags with preg_replace() calls.
  * The main class walks through all the filters and and calls this
  * method if it exists. The filters should modify their private $_text
  * variable.
  *
  * @return   none
  * @access   private
  * @see      $_text
  * @author   Stijn de Reede <sjr@gmx.co.uk>, Seth Price <seth@pricepages.org>
  */
 function _preparse()
 {
     $options = PEAR::getStaticProperty('HTML_BBCodeParser', '_options');
     $o = $options['open'];
     $c = $options['close'];
     $oe = $options['open_esc'];
     $ce = $options['close_esc'];
     $pattern = array("!" . $oe . "\\*" . $ce . "!", "!" . $oe . "(u?)list=(?-i:A)(\\s*[^" . $ce . "]*)" . $ce . "!i", "!" . $oe . "(u?)list=(?-i:a)(\\s*[^" . $ce . "]*)" . $ce . "!i", "!" . $oe . "(u?)list=(?-i:I)(\\s*[^" . $ce . "]*)" . $ce . "!i", "!" . $oe . "(u?)list=(?-i:i)(\\s*[^" . $ce . "]*)" . $ce . "!i", "!" . $oe . "(u?)list=(?-i:1)(\\s*[^" . $ce . "]*)" . $ce . "!i", "!" . $oe . "(u?)list([^" . $ce . "]*)" . $ce . "!i");
     $replace = array($o . "li" . $c, $o . "\$1list=upper-alpha\$2" . $c, $o . "\$1list=lower-alpha\$2" . $c, $o . "\$1list=upper-roman\$2" . $c, $o . "\$1list=lower-roman\$2" . $c, $o . "\$1list=decimal\$2" . $c, $o . "\$1list\$2" . $c);
     $this->_preparsed = preg_replace($pattern, $replace, $this->_text);
 }
开发者ID:googlecode-mirror,项目名称:ascent-phpstats,代码行数:27,代码来源:Lists.php

示例14: _preparse

 /**
  * Executes statements before the actual array building starts
  *
  * This method should be overwritten in a filter if you want to do
  * something before the parsing process starts. This can be useful to
  * allow certain short alternative tags which then can be converted into
  * proper tags with preg_replace() calls.
  * The main class walks through all the filters and and calls this
  * method if it exists. The filters should modify their private $_text
  * variable.
  *
  * @return   none
  * @access   private
  * @see      $_text
  * @author   Stijn de Reede  <sjr@gmx.co.uk>
  */
 function _preparse()
 {
     $options = PEAR::getStaticProperty('HTML_BBCodeParser', '_options');
     $o = $options['open'];
     $c = $options['close'];
     $oe = $options['open_esc'];
     $ce = $options['close_esc'];
     $pattern = array("!(^|\\s|\\()((((http(s?)|ftp)://)|www)[-a-z0-9.]+\\.[a-z]{2,4}[^\\s<()]*)!i", "!" . $oe . "url(" . $ce . "|\\s.*" . $ce . ")(.*)" . $oe . "/url" . $ce . "!iU");
     $replace = array("\\1" . $o . "url" . $c . "\\2" . $o . "/url" . $c, $o . "url=\\2\\1\\2" . $o . "/url" . $c);
     $this->_preparsed = preg_replace($pattern, $replace, $this->_text);
 }
开发者ID:ookwudili,项目名称:chisimba,代码行数:27,代码来源:Links.php

示例15: __construct

 public function __construct($module)
 {
     parent::__construct();
     $this->assign('__action', 'add');
     $tpl = Mreg::get('tpl');
     $tpl->concat('adminTitle', ' :: ' . $this->moduloptions['title'] . ' :: ' . __('Add record'));
     $mopts = PEAR::getStaticProperty('m_office', 'options');
     $mopt = $mopts['modules'][$module];
     $table = $mopt['table'];
     $do = M_Office_Util::doForModule($module);
     $this->append('subActions', '<a href="' . M_Office_Util::getQueryParams(array(), array('record', 'doSingleAction')) . '">' . __('Go to the %s list', array($mopt['title'])) . '</a>');
     $formBuilder =& MyFB::create($do);
     //	linkNewValue creates an issue if some linked elements are put in predefgroups
     //        $formBuilder->linkNewValue = true;
     $form = new MyQuickForm('editRecord', 'POST', M_Office_Util::getQueryParams(array(), array(), false), '_self', null, true);
     $form->addElement('hidden', 'submittedNewRecord', 1);
     if (isset($_REQUEST['filterField'])) {
         $form->addElement('hidden', 'filterField', $_REQUEST['filterField']);
         $form->addElement('hidden', 'filterValue', $_REQUEST['filterValue']);
         $do->{$_REQUEST['filterField']} = $_REQUEST['filterValue'];
     }
     $links = $do->links();
     if (key_exists($_REQUEST['filterField'], $links)) {
         $linfo = explode(':', $links[$_REQUEST['filterField']]);
         $form->addElement('static', 'mod', '', __('Add record with %s = %s', array($_REQUEST['filterField'], $_REQUEST['filterValue'])) . '. ' . '<a href="' . M_Office_Util::getQueryParams(array('table' => $linfo[0], 'record' => $_REQUEST['filterValue']), array('addRecord', 'filterField', 'filterValue')) . '">' . __('Back to main record') . '</a>');
     }
     $formBuilder->useForm($form);
     $formBuilder->getForm();
     if ($this->getOption('createAnother', $table)) {
         $form->addElement('static', '&nbsp;', '&nbsp;');
         $form->addElement('checkbox', 'returnHere', __('Create another record'));
         if (isset($_REQUEST['returnHere']) && $_REQUEST['returnHere']) {
             $form->setDefaults(array('returnHere' => true));
         }
     }
     M_Office_Util::addHiddenFields($form);
     if ($form->validate()) {
         if (PEAR::isError($ret = $form->process(array(&$formBuilder, 'processForm'), false))) {
             $this->append('error', __('An error occured while inserting record') . ' : ' . $ret->getMessage());
         } else {
             $pk = DB_DataObject_FormBuilder::_getPrimaryKey($do);
             $this->say(__('New record was successfully created. Its identifier is : %s', array($do->{$pk})));
             if ($this->getOption('createAnother', $table) && isset($_REQUEST['returnHere']) && $_REQUEST['returnHere']) {
                 M_Office_Util::refresh(M_Office_Util::getQueryParams(array('returnHere' => $_REQUEST['returnHere']), array(), false));
             } else {
                 $pk = DB_DataObject_FormBuilder::_getPrimaryKey($do);
                 M_Office_Util::refresh(M_Office_Util::getQueryParams(array('record' => $do->{$pk}), array('returnHere', 'addRecord'), false));
             }
         }
     } elseif ($form->isSubmitted()) {
     }
     $this->assign('addForm', $form);
     $this->assign('do', $do);
 }
开发者ID:demental,项目名称:m,代码行数:54,代码来源:AddRecord.php


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