• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP unknown类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getOrRegister

 /**
  * 
  * @param unknown $user
  * @return ZfJoacubUsersOnline\Entity\Register
  */
 protected function getOrRegister($user)
 {
     if (isset($this->userRegister[$user->getId()])) {
         return $this->userRegister[$user->getId()];
     }
     $em = $this->sl->get('zf_joacub_users_online_doctrine_em');
     $em instanceof EntityManager;
     $repo = $em->getRepository('ZfJoacubUsersOnline\\Entity\\Register');
     $registerEntity = $repo->findOneBy(array('user' => $user));
     if (!$registerEntity) {
         $registerEntity = new Register();
         $registerEntity->setUser($user);
         $auth = $this->sl->get('zfcuser_auth_service');
         if ($auth->hasIdentity()) {
             if ($auth->getIdentity()->getId() == $user->getId()) {
                 $registerEntity->setLastConnect(new \DateTime('now'));
             } else {
                 $registerEntity->setLastConnect($user->getCreated());
             }
         }
         $registerEntity->setLastConnect($user->getCreated());
         $em->persist($registerEntity);
         $em->flush($registerEntity);
     }
     $this->userRegister[$user->getId()] = $registerEntity;
     return $registerEntity;
 }
开发者ID:joacub,项目名称:zf-joacub-users-online,代码行数:32,代码来源:UsersOnline.php


示例2: smarty_core_display_debug_console

/**
 * Smarty debug_console function plugin
 *
 * Type:     core<br>
 * Name:     display_debug_console<br>
 * Purpose:  display the javascript debug console window
 *
 * @param array   Format: null
 * @param Smarty
 * @param unknown $params
 * @param unknown $smarty (reference)
 * @return unknown
 */
function smarty_core_display_debug_console($params, &$smarty)
{
    // we must force compile the debug template in case the environment
    // changed between separate applications.
    if (empty($smarty->debug_tpl)) {
        // set path to debug template from SMARTY_DIR
        $smarty->debug_tpl = SMARTY_DIR . 'debug.tpl';
        if ($smarty->security && is_file($smarty->debug_tpl)) {
            $smarty->secure_dir[] = dirname(realpath($smarty->debug_tpl));
        }
    }
    $_ldelim_orig = $smarty->left_delimiter;
    $_rdelim_orig = $smarty->right_delimiter;
    $smarty->left_delimiter = '{';
    $smarty->right_delimiter = '}';
    $_compile_id_orig = $smarty->_compile_id;
    $smarty->_compile_id = null;
    $_compile_path = $smarty->_get_compile_path($smarty->debug_tpl);
    if ($smarty->_compile_resource($smarty->debug_tpl, $_compile_path)) {
        ob_start();
        $smarty->_include($_compile_path);
        $_results = ob_get_contents();
        ob_end_clean();
    } else {
        $_results = '';
    }
    $smarty->_compile_id = $_compile_id_orig;
    $smarty->left_delimiter = $_ldelim_orig;
    $smarty->right_delimiter = $_rdelim_orig;
    return $_results;
}
开发者ID:escherlat,项目名称:loquacity,代码行数:44,代码来源:core.display_debug_console.php


示例3: getReceivedData

 /**
  * 获取消息接收数量信息
  * @param unknown $receivedVO
  * 备注:发送采用https需要修改php.ini打开extension=php_openssl.dll
  * 
  */
 public function getReceivedData($receivedVO, $revResult)
 {
     //echo "1111";
     //加密字符串
     $secretEncode = new SecretEncode();
     $authStr = $secretEncode->getBase64Encode($receivedVO->getAuthStr());
     $receivedVO->setAuth($authStr);
     //url
     $url = $this->RECEIVE_API_URL . "?" . $receivedVO->getParams();
     $header = 'Authorization: Basic ' . $receivedVO->getAuth();
     //请求头信息
     $context = array('http' => array('method' => 'GET', 'header' => $header));
     $stream_context = stream_context_create($context);
     //echo $stream_context;
     $httpPostClient = new HttpPostClient();
     $code = 200;
     try {
         $rs = $httpPostClient->request_tools($url, $stream_context);
         //echo $rs;
     } catch (Exception $e) {
         echo $e;
         $code = 404;
     }
     //echo $rs["body"];
     $revResult->setResultStr($rs, $code);
     //echo $revResult->getResultStr();
     return $revResult;
 }
开发者ID:tiger2soft,项目名称:travelman,代码行数:34,代码来源:ReportRecevied.php


示例4: userCreate

    /**
     * ユーザ情報を登録する
     * @param unknown $db
     */
    public function userCreate($db)
    {
        try {
            // 現在日時を取得
            $user_date = date('Y-m-d H:i:s');
            // SQL文を作成
            $sql = 'INSERT INTO user_table (user_id, user_name, user_email, user_password,
			user_age, user_gender, user_profile, user_profile_photo, user_profile_background, user_date)
			VALUES (:user_id, :user_name, :user_email, :user_password, :user_age,
			:user_gender, :user_profile, :user_profile_photo, :user_profile_background, :user_date);';
            $prepare = $db->prepare($sql);
            // SQL文のプレースホルダーに値をバインドする
            $prepare->bindValue(':user_id', $_SESSION['user_id'], PDO::PARAM_STR);
            $prepare->bindValue(':user_name', $_SESSION['user_name'], PDO::PARAM_STR);
            $prepare->bindValue(':user_email', $_SESSION['user_email'], PDO::PARAM_STR);
            // パスワードをハッシュ化
            $prepare->bindValue(':user_password', crypt($_SESSION['user_password']), PDO::PARAM_STR);
            $prepare->bindValue(':user_age', $_SESSION['user_age'], PDO::PARAM_STR);
            $prepare->bindValue(':user_gender', $_SESSION['user_gender'], PDO::PARAM_STR);
            $prepare->bindValue(':user_profile', $_SESSION['user_profile'], PDO::PARAM_STR);
            $prepare->bindValue(':user_profile_photo', $_SESSION['user_profile_photo'], PDO::PARAM_STR);
            $prepare->bindValue(':user_profile_background', $_SESSION['user_profile_background'], PDO::PARAM_STR);
            $prepare->bindValue(':user_date', $user_date, PDO::PARAM_STR);
            $prepare->execute();
        } catch (PDOException $e) {
            echo 'エラー' . entity_str($e->getMessage());
        }
    }
开发者ID:morota-k,项目名称:utwitter,代码行数:32,代码来源:user_model.php


示例5: beforeRenderView

 /**
  * Gets/Saves information about views and stores truncated viewParams.
  *
  * @param unknown $event
  * @param unknown $view
  * @param unknown $file
  */
 public function beforeRenderView($event, $view, $file)
 {
     $params = array();
     $toView = $view->getParamsToView();
     $toView = !$toView ? array() : $toView;
     foreach ($toView as $k => $v) {
         if (is_object($v)) {
             $params[$k] = get_class($v);
         } elseif (is_array($v)) {
             $array = array();
             foreach ($v as $key => $value) {
                 if (is_object($value)) {
                     $array[$key] = get_class($value);
                 } elseif (is_array($value)) {
                     $array[$key] = 'Array[...]';
                 } else {
                     $array[$key] = $value;
                 }
             }
             $params[$k] = $array;
         } else {
             $params[$k] = (string) $v;
         }
     }
     $this->_viewsRendered[] = array('path' => $view->getActiveRenderPath(), 'params' => $params, 'controller' => $view->getControllerName(), 'action' => $view->getActionName());
 }
开发者ID:juicechu,项目名称:phalcon-debug-widget,代码行数:33,代码来源:DebugWidget.php


示例6: beforeRenderView

 /**
  * Gets/Saves information about views and stores truncated viewParams.
  *
  * @param unknown $event
  * @param unknown $view
  * @param unknown $file
  */
 public function beforeRenderView($event, $view, $file)
 {
     $router = $this->getDI()->getRouter();
     $phalconDir = $this->getDI()->getConfig()->path->phalconDir;
     $params = [];
     $toView = $view->getParamsToView();
     $toView = !$toView ? [] : $toView;
     foreach ($toView as $k => $v) {
         if (is_object($v)) {
             $params[$k] = get_class($v);
         } elseif (is_array($v)) {
             $array = [];
             foreach ($v as $key => $value) {
                 if (is_object($value)) {
                     $array[$key] = get_class($value);
                 } elseif (is_array($value)) {
                     $array[$key] = 'Array[...]';
                 } else {
                     $array[$key] = $value;
                 }
             }
             $params[$k] = $array;
         } else {
             $params[$k] = (string) $v;
         }
     }
     $path = str_replace($phalconDir, '', $view->getActiveRenderPath());
     $path = preg_replace('/^modules\\/[a-z]+\\/views\\/..\\/..\\/..\\//', '', $path);
     $this->viewsRendered[] = ['path' => $path, 'params' => $params, 'module' => $router->getModuleName(), 'controller' => $view->getControllerName(), 'action' => $view->getActionName()];
 }
开发者ID:rub3nlh,项目名称:webird,代码行数:37,代码来源:DebugPanel.php


示例7: __invoke

 /**
  * 
  * @param unknown $entries
  * @param unknown $template
  * @param unknown $media
  */
 public function __invoke($entries, $template, $media)
 {
     $templateKey = static::VIEW_TEMPLATE;
     if (isset($entries['modulFormat'])) {
         $templateKey = $entries['modulFormat'];
     }
     $this->setTemplate($template->plugins->{$templateKey});
     $active = false;
     if (strlen($this->view->paramter['article']) > 1) {
         $active = $this->view->paramter['article'];
     }
     $html = '';
     $elements = $this->elements->toArray();
     foreach ($entries['modulContent'] as $entry) {
         $elements = $this->elements->toArray();
         $elements["grid"]["attr"]['href'] = '/' . $entry['url'] . '/tag/' . $entry['tag_scope'];
         $elements["grid"]["attr"]['title'] = $this->linktitle . ' ' . $entry['tag_name'];
         if ($active === $entry['tag_scope']) {
             $elements["grid"]["attr"]['class'] .= ' disabled';
         }
         $html .= $this->deployRow($elements, $entry['tag_name']);
         $elements = null;
     }
     if (strlen($html) > 1) {
         $wrapper = $this->wrapper->toArray();
         if (isset($wrapper['row'])) {
             $wrapper['row']['content:before'] = '<h3>' . $this->headline . '</h3>';
         }
         $html = $this->deployRow($wrapper, $html);
     }
     return $html;
 }
开发者ID:jochum-mediaservices,项目名称:contentinum5.5,代码行数:38,代码来源:Assigns.php


示例8: scopeCustomer

 /**
  * Named scope for customer users
  * @param unknown $query
  */
 public function scopeCustomer($query)
 {
     $query->leftJoin('user_to_role', 'user.id', '=', 'user_to_role.user_id');
     $query->leftJoin('role', 'role.id', '=', 'user_to_role.role_id');
     $query->groupBy('user.id');
     return $query->where('role.value', '=', 'role_customer');
 }
开发者ID:atudz,项目名称:gorabelframework,代码行数:11,代码来源:User.php


示例9: admin_plugin_rss_run

/**
 *
 *
 * @param unknown $bBlog (reference)
 */
function admin_plugin_rss_run(&$bBlog)
{
    $pole = "";
    for ($i = 1; $i < 10; $i++) {
        if (isset($_POST['sending']) && $_POST['sending'] == "true") {
            $id = $_POST[id . $i];
            $ch = $_POST[ch . $i];
            $update_query = "UPDATE " . T_RSS . " SET `url` = '" . $id . "',`input_charset` = '" . $ch . "' WHERE `id` = '" . $i . "' LIMIT 1 ;";
            $bBlog->query($update_query);
        }
        $query = "select * from " . T_RSS . " where id=" . $i . ";";
        $row = $bBlog->get_row($query);
        $rssurl = $row->url;
        $w1250 = "";
        if ($row->input_charset == "W1250") {
            $w1250 = " selected";
        }
        $utf8 = "";
        if ($row->input_charset == "UTF8") {
            $utf8 = " selected";
        }
        if ($i / 2 == floor($i / 2)) {
            $class = 'high';
        } else {
            $class = 'low';
        }
        $pole .= '<tr class="' . $class . '"><td>' . $i . '</td><td><input type="text" name="id' . $i . '" size="20" value="' . $rssurl . '" class="text" /></td><td><select name="ch' . $i . '">';
        $pole .= '<option>I88592</option>';
        $pole .= '<option' . $w1250 . '>W1250</option>';
        $pole .= '<option' . $utf8 . '>UTF8</option>';
        $pole .= '</select></td></tr>';
    }
    $bBlog->assign('pole', $pole);
}
开发者ID:escherlat,项目名称:loquacity,代码行数:39,代码来源:admin.rss.php


示例10: equals

 /**
  * Compares the specified object with this collection for equality.
  * @param unknown $object
  * @return boolean
  */
 public function equals($object)
 {
     if (!$object instanceof CollectionInterface) {
         return false;
     }
     return $this->hashCode() === $object->hashCode();
 }
开发者ID:john-wilkinson,项目名称:collections,代码行数:12,代码来源:CollectionAbstract.php


示例11: login

/**
 * 
 * @param unknown $user
 * @param unknown $pwd
 * @param unknown $DBH
 * @return found boolean false jos annettua käyttäjää ja salasanaa löydy
 */
function login($user, $pwd, $DBH)
{
    // !! on suola, jotta kantaan taltioitu eri hashkoodi vaikka salasana olisi tiedossa
    //kokeile !! ja ilman http://www.danstools.com/md5-hash-generator/
    //Tukevampia salauksia hash('sha256', $pwd ) tai hash('sha512', $pwd )
    //MD5 on 128 bittinen
    $hashpwd = hash('md5', $pwd . '!!');
    //An array of values with as many elements as there are bound parameters in the
    //SQL statement being executed. All values are treated as PDO::PARAM_STR
    $data = array('kayttaja' => $user, 'passu' => $hashpwd);
    //print_r($data);
    try {
        //print_r($data);
        //echo "Login 1<br />";
        $STH = $DBH->prepare("SELECT * FROM 0mrb_users WHERE email=:kayttaja AND\n\t\tpwd = :passu");
        $STH->execute($data);
        $STH->setFetchMode(PDO::FETCH_OBJ);
        $row = $STH->fetch();
        //print_r($row);
        if ($STH->rowCount() > 0) {
            //echo "Login 4<br />";
            return $row;
        } else {
            //echo "Login 5<br />";
            return false;
        }
    } catch (PDOException $e) {
        echo "Login DB error.";
        file_put_contents('log/DBErrors.txt', 'Login: ' . $e->getMessage() . "\n", FILE_APPEND);
    }
}
开发者ID:rikutimonen,项目名称:ringbanan,代码行数:38,代码来源:functions.php


示例12: getDomainByRoute

 /**
  * todo: this shouldn't be a concern of this class and should be moved
  * either to the dispatcher or a somewhere more practical
  *
  * @param unknown $request
  */
 private function getDomainByRoute($request)
 {
     $route = $this->dispatcher->dispatch($request->getMethod(), $request->getUri()->getPath());
     $fullDomainName = $route[1]->getDomain();
     $domain = end(explode('\\', $fullDomainName));
     return $domain;
 }
开发者ID:andypoorman,项目名称:wheniwork,代码行数:13,代码来源:AclMiddleware.php


示例13: smarty_function_debug

/**
 * Smarty {debug} function plugin
 *
 * Type:     function<br>
 * Name:     debug<br>
 * Date:     July 1, 2002<br>
 * Purpose:  popup debug window
 *
 * @link http://smarty.php.net/manual/en/language.function.debug.php {debug}
 *       (Smarty online manual)
 * @author   Monte Ohrt <[email protected]>
 * @version  1.0
 * @param array
 * @param Smarty
 * @param unknown $params
 * @param unknown $smarty (reference)
 * @return string output from {@link Smarty::_generate_debug_output()}
 */
function smarty_function_debug($params, &$smarty)
{
    if ($params['output']) {
        $smarty->assign('_smarty_debug_output', $params['output']);
    }
    require_once SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.display_debug_console.php';
    return smarty_core_display_debug_console(null, $smarty);
}
开发者ID:escherlat,项目名称:loquacity,代码行数:26,代码来源:function.debug.php


示例14: countRow

/**
 * Count Row
 *
 * @param unknown $query        	
 * @return boolean
 */
function countRow($query)
{
    if ($query->num_rows() > 0) {
        return $query->num_rows();
    } else {
        return false;
    }
}
开发者ID:alfonkdp,项目名称:soad,代码行数:14,代码来源:global_helper.php


示例15: onBootstrap

 /**
  * on bootstrap
  * @param unknown $e event
  * @return void
  */
 public function onBootstrap($e)
 {
     // You may not need to do this if you're doing it elsewhere in your
     // application
     $eventManager = $e->getApplication()->getEventManager();
     $moduleRouteListener = new ModuleRouteListener();
     $moduleRouteListener->attach($eventManager);
 }
开发者ID:EngrHaiderAli,项目名称:movein-servie,代码行数:13,代码来源:Module.php


示例16: printHeaders

 /**
  *
  * @param unknown $objPHPExcel        	
  * @param unknown $cols        	
  */
 private static function printHeaders($objPHPExcel, $cols)
 {
     $count = 1;
     $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, 2, "Data");
     foreach ($cols as $col) {
         $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($count++, 2, sprintf("%7s", $col));
     }
 }
开发者ID:amarcinkowski,项目名称:hospitalplugin,代码行数:13,代码来源:ExcelExportPunction.php


示例17: addQueryFields

 /**
  * Add the fields to the form for the query mode
  *
  * @param unknown $form
  */
 protected function addQueryFields($form)
 {
     $options = $this->options;
     $form->add('targetPattern');
     $form->add('query');
     $form->add('maxResults');
     $form->add('fields', 'widget_fields', array('label' => 'widget.form.entity.fields.label', 'namespace' => $options['namespace'], 'widget' => $options['widget']));
 }
开发者ID:vincent-chapron,项目名称:WidgetListingBundle,代码行数:13,代码来源:WidgetListingType.php


示例18: ternaryHandler

 /**
  * 处理赋值语句右边的三元表达式
  * @param unknown $part
  * @param unknown $dataFlow
  */
 public static function ternaryHandler($type, $part, $dataFlow)
 {
     $ter_symbol = new MutipleSymbol();
     $ter_symbol->setItemByNode($part);
     if ($type == 'right') {
         $dataFlow->setValue($ter_symbol);
     }
 }
开发者ID:getcode2git,项目名称:phpvulhunter,代码行数:13,代码来源:BIFuncUtils.class.php


示例19: smarty_function_cycle

/**
 * Smarty {cycle} function plugin
 *
 * Type:     function<br>
 * Name:     cycle<br>
 * Date:     May 3, 2002<br>
 * Purpose:  cycle through given values<br>
 * Input:
 *         - name = name of cycle (optional)
 *         - values = comma separated list of values to cycle,
 *                    or an array of values to cycle
 *                    (this can be left out for subsequent calls)
 *         - reset = boolean - resets given var to true
 *         - print = boolean - print var or not. default is true
 *         - advance = boolean - whether or not to advance the cycle
 *         - delimiter = the value delimiter, default is ","
 *         - assign = boolean, assigns to template var instead of
 *                    printed.
 *
 * Examples:<br>
 * <pre>
 * {cycle values="#eeeeee,#d0d0d0d"}
 * {cycle name=row values="one,two,three" reset=true}
 * {cycle name=row}
 * </pre>
 *
 * @link http://smarty.php.net/manual/en/language.function.cycle.php {cycle}
 *       (Smarty online manual)
 * @author Monte Ohrt <[email protected]>
 * @author credit to Mark Priatel <[email protected]>
 * @author credit to Gerard <[email protected]>
 * @author credit to Jason Sweat <[email protected]>
 * @version  1.3
 * @param array
 * @param Smarty
 * @param unknown $params
 * @param unknown $smarty (reference)
 * @return string|null
 */
function smarty_function_cycle($params, &$smarty)
{
    static $cycle_vars;
    extract($params);
    if (empty($name)) {
        $name = 'default';
    }
    if (!isset($print)) {
        $print = true;
    }
    if (!isset($advance)) {
        $advance = true;
    }
    if (!isset($reset)) {
        $reset = false;
    }
    if (!in_array('values', array_keys($params))) {
        if (!isset($cycle_vars[$name]['values'])) {
            $smarty->trigger_error("cycle: missing 'values' parameter");
            return;
        }
    } else {
        if (isset($cycle_vars[$name]['values']) && $cycle_vars[$name]['values'] != $values) {
            $cycle_vars[$name]['index'] = 0;
        }
        $cycle_vars[$name]['values'] = $values;
    }
    if (isset($delimiter)) {
        $cycle_vars[$name]['delimiter'] = $delimiter;
    } elseif (!isset($cycle_vars[$name]['delimiter'])) {
        $cycle_vars[$name]['delimiter'] = ',';
    }
    if (!is_array($cycle_vars[$name]['values'])) {
        $cycle_array = explode($cycle_vars[$name]['delimiter'], $cycle_vars[$name]['values']);
    } else {
        $cycle_array = $cycle_vars[$name]['values'];
    }
    if (!isset($cycle_vars[$name]['index']) || $reset) {
        $cycle_vars[$name]['index'] = 0;
    }
    if (isset($assign)) {
        $print = false;
        $smarty->assign($assign, $cycle_array[$cycle_vars[$name]['index']]);
    }
    if ($print) {
        $retval = $cycle_array[$cycle_vars[$name]['index']];
    } else {
        $retval = null;
    }
    if ($advance) {
        if ($cycle_vars[$name]['index'] >= count($cycle_array) - 1) {
            $cycle_vars[$name]['index'] = 0;
        } else {
            $cycle_vars[$name]['index']++;
        }
    }
    return $retval;
}
开发者ID:escherlat,项目名称:loquacity,代码行数:97,代码来源:function.cycle.php


示例20: getRoute

 /**
  * @todo wrong integration when using cli application!
  *
  * @param unknown $request
  *
  * @return unknown
  */
 public function getRoute($request)
 {
     if ($this->rewriteEnabled) {
         $route = $request->getRequestPathSuffix();
     } else {
         $route = $request->get('route', false);
     }
     return $route;
 }
开发者ID:nadar,项目名称:ifw,代码行数:16,代码来源:Routing.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP unknown_type类代码示例发布时间:2022-05-23
下一篇:
PHP unix类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap