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


PHP func_get_args函数代码示例

本文整理汇总了PHP中func_get_args函数的典型用法代码示例。如果您正苦于以下问题:PHP func_get_args函数的具体用法?PHP func_get_args怎么用?PHP func_get_args使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: command_dd

 function command_dd()
 {
     $args = func_get_args();
     $options = $this->get_options();
     $dd = kernel::single('dev_docbuilder_dd');
     if (empty($args)) {
         $dd->export();
     } else {
         foreach ($args as $app_id) {
             $dd->export_tables($app_id);
         }
     }
     if ($filename = $options['result-file']) {
         ob_start();
         $dd->output();
         $out = ob_get_contents();
         ob_end_clean();
         if (!is_dir(dirname($filename))) {
             throw new Exception('cannot find the ' . dirname($filename) . 'directory');
         } elseif (is_dir($filename)) {
             throw new Exception('the result-file path is a directory.');
         }
         file_put_contents($options['result-file'], $out);
         echo 'data dictionary doc export success.';
     } else {
         $dd->output();
     }
 }
开发者ID:sss201413,项目名称:ecstore,代码行数:28,代码来源:doc.php

示例2: display

 /**
  * Displays a view
  *
  * @param mixed What page to display
  * @return void
  * @throws NotFoundException When the view file could not be found
  *	or MissingViewException in debug mode.
  */
 public function display()
 {
     $path = func_get_args();
     //debug($path);
     $count = count($path);
     //debug($count);
     if (!$count) {
         return $this->redirect('/');
     }
     $page = $subpage = $title_for_layout = null;
     //debug(Inflector::humanize($path[$count - 1]));
     if (!empty($path[0])) {
         $page = $path[0];
     }
     if (!empty($path[1])) {
         $subpage = $path[1];
     }
     if (!empty($path[$count - 1])) {
         $title_for_layout = Inflector::humanize($path[$count - 1]);
     }
     $this->set(compact('page', 'subpage', 'title_for_layout'));
     //debug($this->render(implode('/', $path)));
     //debug($page);
     //debug($subpage);
     //debug($title_for_layout);
     try {
         $this->render(implode('/', $path));
     } catch (MissingViewException $e) {
         if (Configure::read('debug')) {
             throw $e;
         }
         throw new NotFoundException();
     }
 }
开发者ID:pavsnellski,项目名称:SMC,代码行数:42,代码来源:PagesController.php

示例3: testCodePageNumberToName

 /**
  * @dataProvider providerCodePage
  */
 public function testCodePageNumberToName()
 {
     $args = func_get_args();
     $expectedResult = array_pop($args);
     $result = call_user_func_array(array('PHPExcel_Shared_CodePage', 'NumberToName'), $args);
     $this->assertEquals($expectedResult, $result);
 }
开发者ID:rodrigopbel,项目名称:ong,代码行数:10,代码来源:CodePageTest.php

示例4: value

 /**
  * Gets or sets the inner value
  *
  * @param string $value
  * @return string
  */
 public function value()
 {
     if ($args = func_get_args()) {
         $this->__value = $args[0];
     }
     return $this->__value;
 }
开发者ID:dsi-agpt,项目名称:cdmfr,代码行数:13,代码来源:Searchword.php

示例5: __

 /**
  * Translate a phrase
  *
  * @return string
  */
 public function __()
 {
     $args = func_get_args();
     $expr = new Mage_Core_Model_Translate_Expr(array_shift($args), $this->_getRealModuleName());
     array_unshift($args, $expr);
     return AO::app()->getTranslator()->translate($args);
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:12,代码来源:Action.php

示例6: dd

 /**
  * Dump & Die
  *
  * @codeCoverageIgnore
  */
 function dd()
 {
     array_map(function ($x) {
         var_dump($x);
     }, func_get_args());
     die;
 }
开发者ID:arcanedev,项目名称:arabic,代码行数:12,代码来源:helpers.php

示例7: query

 /**
  * {@inheritDoc}
  */
 public function query(Query $query)
 {
     $this->logger->startCall(__FUNCTION__, func_get_args(), array('fetchDepth' => $this->transport->getFetchDepth()));
     $result = $this->transport->query($query);
     $this->logger->stopCall();
     return $result;
 }
开发者ID:nikophil,项目名称:cmf-tests,代码行数:10,代码来源:LoggingClient.php

示例8: index

 public function index()
 {
     $this->load->model('printing_model');
     $this->load->model('settings_model');
     $this->load->model('contests_model');
     $arg_list = func_get_args();
     $contest = $this->contests_model->getCurrentContest();
     $points_table_used = $this->contests_model->getPointsUsed();
     if (!$this->contests_model->table_exists($points_table_used) or $this->contests_model->tableEmpty($points_table_used)) {
         redirect("/competitors?redirected_from='site.php'");
     }
     $data['all_input_tables'] = $this->printing_model->allWrittenInputTables($contest);
     $data['all_charters'] = $this->printing_model->allWrittenCharters($contest);
     $data['gcp_status'] = $this->settings_model->getGCPStatus();
     if (!$this->printing_model->printerConfigured()) {
         $data['printer_set_up'] = FALSE;
     }
     if ($this->input->get('class_selection') and $this->input->get('print_function')) {
         $this->load->model('classes_model');
         $data['class_selection']['class_id'] = $this->input->get('class_selection');
         $data['class_selection']['class_name'] = $this->classes_model->getClassName($data['class_selection']['class_id']);
         $data['print_function'] = $this->input->get('print_function');
     }
     if (isset($arg_list[0]['input_tables']['printing']['status']['completed']) && $arg_list[0]['input_tables']['printing']['status']['completed']) {
         $data['input_tables']['printing']['status']['completed'] = $arg_list[0]['input_tables'];
     }
     if (isset($arg_list[0]['error']['uncomplete']) && $arg_list[0]['error']['uncomplete']) {
         $data['error']['uncomplete'] = true;
     }
     $data['main_content'] = 'printing_view.php';
     $this->load->view('/includes/template.php', $data);
 }
开发者ID:kilianvolmer,项目名称:GiegSports,代码行数:32,代码来源:printing.php

示例9: plugin_fusen_convert

 function plugin_fusen_convert()
 {
     $prms = func_get_args();
     if (isset($prms[0]) && $prms[0] === 'spliter' && isset($prms[1])) {
         $id = intval($prms[1]);
         return '<!--NA-->' . $this->conf['spliter'] . $id . '<!--/NA-->';
     }
     $base = '';
     $divclass = 'xpwiki_' . $this->root->mydirname;
     $res = array();
     if ($this->root->render_mode === 'render') {
         return '';
     } else {
         if ($this->root->render_mode === 'block') {
             if (empty($GLOBALS['Xpwiki_' . $this->root->mydirname]['is_read']) || !empty($GLOBALS['Xpwiki_' . $this->root->mydirname]['cache']['fusen']['loaded'])) {
                 return '';
             }
             $res = $this->func->set_current_page($GLOBALS['Xpwiki_' . $this->root->mydirname]['page']);
             $base = 'xpwiki_body';
             $divclass = 'xpwiki_b_' . $this->root->mydirname;
             $this->root->pagecache_min = 0;
         }
     }
     $html = $this->get_html(func_get_args(), $base, $divclass);
     if ($res) {
         $this->func->set_current_page($res['page']);
     }
     return $html;
 }
开发者ID:nouphet,项目名称:rata,代码行数:29,代码来源:fusen.inc.php

示例10: instance

 /**
  * Returns an instance of the singleton.
  * 
  * Passes args to constructor
  */
 public static final function instance()
 {
     if (null === static::$_instance) {
         static::$_instance = new self(func_get_args());
     }
     return self::$_instance;
 }
开发者ID:prggmr,项目名称:xpspl,代码行数:12,代码来源:singleton.php

示例11: getAttributesByKey

 public function getAttributesByKey()
 {
     $_aParams = func_get_args() + array(0 => '');
     $_sKey = $_aParams[0];
     $_bIsMultiple = '' !== $_sKey;
     return $this->getElement($this->aAttributes, $_sKey, array()) + array('type' => 'checkbox', 'id' => $this->aAttributes['id'] . '_' . $_sKey, 'checked' => $this->getElement($this->aAttributes, array('value', $_sKey), null) ? 'checked' : null, 'value' => 1, 'name' => $_bIsMultiple ? "{$this->aAttributes['name']}[{$_sKey}]" : $this->aAttributes['name'], 'data-id' => $this->aAttributes['id']) + $this->aAttributes;
 }
开发者ID:sultann,项目名称:admin-page-framework,代码行数:7,代码来源:AdminPageFramework_Input_checkbox.php

示例12: _activeHook

 private function _activeHook($type)
 {
     if (!isset($this->_hooks[$type])) {
         return null;
     }
     $hook =& $this->_hooks[$type];
     global $_G;
     if (!in_array($hook['plugin'], $_G['setting']['plugins']['available'])) {
         return null;
     }
     if (!preg_match("/^[\\w\\_]+\$/i", $hook['plugin']) || !preg_match('/^[\\w\\_\\.]+\\.php$/i', $hook['include'])) {
         return null;
     }
     include_once DISCUZ_ROOT . 'source/plugin/' . $hook['plugin'] . '/' . $hook['include'];
     if (!class_exists($hook['class'], false)) {
         return null;
     }
     if (!isset($this->classes[$hook['class']])) {
         $this->classes[$hook['class']] = new $hook['class']();
     }
     if (!method_exists($this->classes[$hook['class']], $hook['method'])) {
         return null;
     }
     $param = func_get_args();
     array_shift($param);
     return $this->classes[$hook['class']]->{$hook}['method']($param);
 }
开发者ID:hacktea8,项目名称:d_z_s_t_u_d_e_n_t,代码行数:27,代码来源:wechat.lib.class.php

示例13: dump

 /**
  * Nette\Diagnostics\Debugger::dump() shortcut.
  * @tracySkipLocation
  */
 function dump($var)
 {
     foreach (func_get_args() as $arg) {
         Debugger::dump($arg);
     }
     return $var;
 }
开发者ID:Johnik010,项目名称:rezervace,代码行数:11,代码来源:shortcuts.php

示例14: query

 /**
  * Query database
  *
  * @param   string        $sql          SQL Query
  * @param   array|string  $replacement  Replacement
  * @return  mixed
  */
 public function query()
 {
     $args = func_get_args();
     $sql = array_shift($args);
     // Menerapkan $replacement ke pernyataan $sql
     if (!empty($args)) {
         $sql = vsprintf($sql, $args);
     }
     try {
         // Return 'false' kalo belum ada koneksi
         if (!$this->_db) {
             $this->connect();
         }
         $this->_sql = $sql;
         // Eksekusi SQL Query
         if ($results = $this->_db->query($sql)) {
             if (is_bool($results)) {
                 return $results;
             }
             $this->_results = $results;
             $this->_num_rows = $this->_results->num_rows;
             return $this;
         } else {
             App::error($this->_db->error . '<br>' . $this->_sql);
         }
     } catch (Exception $e) {
         setAlert('error', $e->getMessage());
         return false;
     }
 }
开发者ID:tommyputranto,项目名称:tokonlen,代码行数:37,代码来源:Db.php

示例15: TR

function TR()
{
    // writes a table row using row_data to fill the td's.
    // nothing else is needed, since colors and fonts will be
    // determined by the style sheet.
    //
    // Optionally a 2nd parameter may be provided, tr_param,
    // which can contain any parameters to the <tr> tag..
    $arg = func_get_args();
    if (count($arg) > 1) {
        list($row_data, $tr_param) = $arg;
    } else {
        $row_data = $arg[0];
        $tr_param = null;
    }
    echo "<tr";
    if ($tr_param) {
        echo " {$tr_param}";
    }
    echo ">\n";
    foreach ($row_data as $td_data) {
        echo "\t<td>{$td_data}</td>\n";
    }
    echo "</tr>\n";
}
开发者ID:thctlo,项目名称:1.2.0,代码行数:25,代码来源:msre_table_functions.php


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