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


PHP State::getState方法代碼示例

本文整理匯總了PHP中State::getState方法的典型用法代碼示例。如果您正苦於以下問題:PHP State::getState方法的具體用法?PHP State::getState怎麽用?PHP State::getState使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在State的用法示例。


在下文中一共展示了State::getState方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: deleteState

 public function deleteState(State $state)
 {
     if (!isset($_SESSION['php-oauth-client']['state'])) {
         return false;
     }
     foreach ($_SESSION['php-oauth-client']['state'] as $k => $s) {
         $sessionState = unserialize($s);
         if ($state->getState() !== $sessionState->getState()) {
             continue;
         }
         unset($_SESSION['php-oauth-client']['state'][$k]);
         return true;
     }
     return false;
 }
開發者ID:kduqi,項目名稱:php-oauth-client,代碼行數:15,代碼來源:SessionStorage.php

示例2: Directory

<div class="widget-box">
    <div class="widget-header">
        <h5>Details Directory (<?php 
echo $model->title;
?>
)</h5>
        <div class="widget-toolbar">
            <a data-action="settings" href="#"><i class="icon-cog"></i></a>
            <a data-action="reload" href="#"><i class="icon-refresh"></i></a>
            <a data-action="collapse" href="#"><i class="icon-chevron-up"></i></a>
            <a data-action="close" href="#"><i class="icon-remove"></i></a>
        </div>
        <div class="widget-toolbar">
            <?php 
echo CHtml::link('<i class="icon-pencil"></i>', array('update', 'id' => $model->id), array('data-rel' => 'tooltip', 'title' => 'Edit', 'data-placement' => 'bottom'));
?>
        </div>
        <div class="widget-toolbar">
            <?php 
echo CHtml::link('<i class="icon-plus"></i>', array('create'), array('data-rel' => 'tooltip', 'title' => 'Add', 'data-placement' => 'bottom'));
?>
        </div>
    </div><!--/.widget-header -->
    <div class="widget-body">
        <div class="widget-main">
            <?php 
$this->widget('zii.widgets.CDetailView', array('htmlOptions' => array('class' => 'table table-striped table-condensed table-hover'), 'data' => $model, 'attributes' => array('id', array('name' => 'category', 'type' => 'raw', 'value' => DirectoryCategory::getDirectoryCategory($model->category)), 'title', 'address', 'postcode', array('name' => 'country', 'type' => 'raw', 'value' => Country::getCountry($model->country)), array('name' => 'state', 'type' => 'raw', 'value' => State::getState($model->state)), array('name' => 'city', 'type' => 'raw', 'value' => City::getCity($model->city)), array('name' => 'district', 'type' => 'raw', 'value' => District::getDistrict($model->district)), array('name' => 'thana', 'type' => 'raw', 'value' => Thana::getThana($model->thana)), 'telephone', 'mobile', 'email', 'fax', 'website', 'details', array('name' => 'created_by', 'type' => 'raw', 'value' => UserAdmin::get_user_name($model->created_by)), array('name' => 'created_on', 'type' => 'raw', 'value' => UserAdmin::get_date_time($model->created_on)), array('name' => 'modified_by', 'type' => 'raw', 'value' => UserAdmin::get_user_name($model->modified_by)), array('name' => 'modified_on', 'type' => 'raw', 'value' => UserAdmin::get_date_time($model->modified_on)), array('name' => 'published', 'value' => $model->published ? "Yes" : "No"), 'hits')));
?>
        </div>
    </div><!--/.widget-body -->
</div><!--/.widget-box -->
開發者ID:optimosolution,項目名稱:jasorbd,代碼行數:31,代碼來源:view.php

示例3: getNewCellStateForDeadCell

 /**
  * @dataProvider getNewCellStateForDeadCellProvider
  * @test
  * @param int $x
  * @param int $y
  * @param State $expected
  */
 public function getNewCellStateForDeadCell($x, $y, State $expected)
 {
     $this->assertEquals($expected->getState(), $this->createCellManager()->getCellNewState($this->cells, $x, $y)->getState());
 }
開發者ID:jelito,項目名稱:game-of-life-glogster,代碼行數:11,代碼來源:CellManagerTest.php

示例4: Thana

<div class="widget-box">
    <div class="widget-header">
        <h5>Details Thana (<?php 
echo $model->title;
?>
)</h5>
        <div class="widget-toolbar">
            <a data-action="settings" href="#"><i class="icon-cog"></i></a>
            <a data-action="reload" href="#"><i class="icon-refresh"></i></a>
            <a data-action="collapse" href="#"><i class="icon-chevron-up"></i></a>
            <a data-action="close" href="#"><i class="icon-remove"></i></a>
        </div>
        <div class="widget-toolbar">
            <?php 
echo CHtml::link('<i class="icon-pencil"></i>', array('update', 'id' => $model->id), array('data-rel' => 'tooltip', 'title' => 'Edit', 'data-placement' => 'bottom'));
?>
        </div>
        <div class="widget-toolbar">
            <?php 
echo CHtml::link('<i class="icon-plus"></i>', array('create'), array('data-rel' => 'tooltip', 'title' => 'Add', 'data-placement' => 'bottom'));
?>
        </div>
    </div><!--/.widget-header -->
    <div class="widget-body">
        <div class="widget-main">
            <?php 
$this->widget('zii.widgets.CDetailView', array('htmlOptions' => array('class' => 'table table-striped table-condensed table-hover'), 'data' => $model, 'attributes' => array('id', array('name' => 'country_id', 'type' => 'raw', 'value' => Country::getCountry($model->country_id)), array('name' => 'state_id', 'type' => 'raw', 'value' => State::getState($model->state_id)), array('name' => 'city_id', 'type' => 'raw', 'value' => City::getCity($model->city_id)), array('name' => 'district_id', 'type' => 'raw', 'value' => District::getDistrict($model->district_id)), 'title', array('name' => 'published', 'value' => $model->published ? "Yes" : "No"))));
?>
        </div>
    </div><!--/.widget-body -->
</div><!--/.widget-box -->
開發者ID:optimosolution,項目名稱:jasorbd,代碼行數:31,代碼來源:view.php

示例5:

                                            <div class="profile-info-row">
                                                <div class="profile-info-name"> Country </div>

                                                <div class="profile-info-value">
                                                    <span><?php 
echo Country::getCountry($model_profile->country_id);
?>
</span>
                                                </div>
                                            </div>
                                            <div class="profile-info-row">
                                                <div class="profile-info-name"> State </div>

                                                <div class="profile-info-value">
                                                    <span><?php 
echo State::getState($model_profile->state_id);
?>
</span>
                                                </div>
                                            </div>
                                            <div class="profile-info-row">
                                                <div class="profile-info-name"> City </div>

                                                <div class="profile-info-value">
                                                    <span><?php 
echo City::getCity($model_profile->city_id);
?>
</span>
                                                </div>
                                            </div>
                                            <div class="profile-info-row">
開發者ID:optimosolution,項目名稱:jasorbd,代碼行數:31,代碼來源:view.php


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