當前位置: 首頁>>代碼示例>>PHP>>正文


PHP unknown類代碼示例

本文整理匯總了PHP中unknown的典型用法代碼示例。如果您正苦於以下問題:PHP unknown類的具體用法?PHP unknown怎麽用?PHP unknown使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了unknown類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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 <monte@ispi.net>
 * @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


注:本文中的unknown類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。