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


PHP Y::dump方法代碼示例

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


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

示例1: getListView

    public function getListView(&$criteria, $return = false)
    {
        $dp = new EActiveDataProvider(get_class($this->model), array(
            'criteria' => $criteria,
            //'pagination' => $this->settings['pagination'],
        ));

        //default params
        $params = array(
            'dataProvider'=>$dp,
            'pager'=>array(
                'id'=>$this->widgetModel->pk.'Pager', 'class'=>'LinkPager', 'htmlOptions'=>array('class'=>'pager'),
                'cssFile'=>Yii::app()->baseUrl.'/css/pager.css'
            ),
            'ajaxUpdate'=>true,
            'template'=>$this->render('listTemplate', array(), true),
            'afterAjaxUpdate' => ModelFactory::getAfterAjaxUpdateFunction($this->category->type),
            'beforeAjaxUpdate' => ModelFactory::getBeforeAjaxUpdateFunction($this->category->type),
            'category' => $this->category,
            'contextWidget' => $this
        );

        try {
            $res = Y::controller()->widget('ListView', $params, true);
        } catch (CException $e) {
            Y::dump($e->__toString());
        }

        if ($return)
            return $res;
        else
            echo $res;
    }
開發者ID:nizsheanez,項目名稱:PolymorphCMS,代碼行數:33,代碼來源:ImageGalleryWidget.php

示例2: __toString

 public function __toString() //__toString can't throw Exception in PHP
 {
     try {
         return $this->renderBlock($this->templateAlias);
     } catch (CException $e) {
         Y::dump($e->__toString());
     }
 }
開發者ID:nizsheanez,項目名稱:PolymorphCMS,代碼行數:8,代碼來源:BlockViewer.php

示例3: setPositions

 public function setPositions($ids, $table, $criteria = null)
 {
     $criteria = $criteria ? $criteria : new CDbCriteria();
     $owner = $this->getOwner();
     $pk = $owner->primaryKey();
     //last id have 0 priority => revers => first id have 0 priority => flip => every id have their priority
     $priorities = array_flip(array_reverse($ids));
     $data = array('priority' => Sql::arrToCase($pk, $priorities));
     $c = Yii::app()->db->commandBuilder->createUpdateCommand($table, $data, $criteria);
     Y::dump($c->execute());
 }
開發者ID:nizsheanez,項目名稱:documentation,代碼行數:11,代碼來源:SortableBehavior.php

示例4: actionAdmin

	/**
	 * Manages all models.
	 */
	public function actionAdmin()
	{
		$all = Lookup::model()->getAll();
		Y::dump($all);
		$model = new Portfolio('search');
		$model->unsetAttributes();  // clear any default values
		$model = $model->current($cat);
		
		if (isset($_GET['Portfolio']))
			$model->attributes=$_GET['Portfolio'];
		
		if (isset($_GET['ajax'])) {
			$this->renderPartial('admingrid',array(
	            'model'=>$model,
		    ));
    	} else {
    		$this->render('admin',array(
				'model'=>$model,
    			'cat'=>$cat
    		));
		}
	}
開發者ID:nizsheanez,項目名稱:PolymorphCMS,代碼行數:25,代碼來源:SettingsController.php

示例5: actionBisec

 public function actionBisec()
 {
     $c = Yii::app()->db->getCommandBuilder()->createFindCommand('edge', new CDbCriteria(array('condition' => 't.edge="associate"')));
     $data = $c->limit(1000)->query();
     $n = Node::model()->count();
     $tmp = array_fill(0, $n, 10000);
     $W = array_fill(0, $n, $tmp);
     $k = 0;
     foreach ($data as $item) {
         $i = (int) $item['source'];
         $j = (int) $item['target'];
         $W[$i][$j] = $W[$j][$i] = 1;
         if (++$k > 100) {
             break;
         }
     }
     Y::end(round(memory_get_peak_usage() / (1024 * 1024), 2) . "MB");
     $f = Yii::getPathOfAlias('application') . '/../gr.txt';
     Y::dump(file_put_contents($f, json_encode($W)));
     // Initialization
     for ($i = 0; $i < $n; $i++) {
         $W[$i][$i] = INF;
     }
     $f = Yii::getPathOfAlias('application') . '/../gr.txt';
     Y::dump(file_put_contents($f, json_encode($W)));
     // Algorithm
     for ($k = 0; $k < $n; $k++) {
         for ($i = 0; $i < $n; $i++) {
             for ($j = 0; $j < $n; $j++) {
                 $W[$i][$j] = min($W[$i][$j], $W[$i][$k] + $W[$k][$j]);
             }
         }
         if ($k == 10) {
             break;
         }
     }
     Y::end($W);
 }
開發者ID:nizsheanez,項目名稱:kur.ru,代碼行數:38,代碼來源:RunController.php

示例6: actionSaveWidgetsPosition

	public function actionSaveWidgetsPosition($blockPk, $widgets)
	{
		Y::dump($widgets);
	}
開發者ID:nizsheanez,項目名稱:PolymorphCMS,代碼行數:4,代碼來源:BlocksController.php

示例7: handlerUpdate

 public function handlerUpdate($event)
 {
     Y::dump($this->getViewPath());
 }
開發者ID:nizsheanez,項目名稱:PolymorphCMS,代碼行數:4,代碼來源:RecordsController.php


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