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


PHP JO_Registry::getArray方法代码示例

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


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

示例1: left_partAction

 public function left_partAction()
 {
     $request = $this->getRequest();
     $this->view->pin = JO_Registry::get('pin_info');
     //		$this->view->onto_board = Helper_Pin::getBoardPins( JO_Registry::getArray('pin_info[board_id]'), 9, 60 );
     $boards = Model_Boards::getBoards(array('start' => 0, 'limit' => 1, 'filter_id_in' => JO_Registry::getArray('pin_info[board_id]')));
     $this->view->has_edit_boards = true;
     $this->view->enable_sort = true;
     $this->view->onto_board = '';
     if ($boards) {
         $view = JO_View::getInstance();
         $view->loged = JO_Session::get('user[user_id]');
         $view->enable_sort = false;
         $model_images = new Helper_Images();
         foreach ($boards as $board) {
             $board['href'] = WM_Router::create($request->getBaseUrl() . '?controller=boards&action=view&user_id=' . $board['user_id'] . '&board_id=' . $board['board_id']);
             $board['thumbs'] = array();
             $get_big = false;
             for ($i = 0; $i < 5; $i++) {
                 $image = isset($board['pins_array'][$i]) ? $board['pins_array'][$i]['image'] : false;
                 if ($image) {
                     if ($get_big) {
                         $size = '_A';
                     } else {
                         $size = '_C';
                         $get_big = true;
                     }
                     $data_img = Helper_Uploadimages::pin($board['pins_array'][$i], $size);
                     if ($data_img) {
                         $board['thumbs'][] = $data_img['image'];
                     } else {
                         $board['thumbs'][] = false;
                     }
                 } else {
                     $board['thumbs'][] = false;
                 }
             }
             $board['boardIsFollow'] = Model_Users::isFollow(array('board_id' => $board['board_id']));
             $board['userFollowIgnore'] = $board['user_id'] != JO_Session::get('user[user_id]');
             $board['follow'] = WM_Router::create($request->getBaseUrl() . '?controller=boards&action=follow&user_id=' . $board['user_id'] . '&board_id=' . $board['board_id']);
             $board['edit'] = false;
             if ($board['user_id'] == JO_Session::get('user[user_id]')) {
                 $board['edit'] = WM_Router::create($request->getBaseUrl() . '?controller=boards&action=edit&user_id=' . $board['user_id'] . '&board_id=' . $board['board_id']);
             }
             $view->board = $board;
             $this->view->onto_board .= $view->render('box', 'boards');
         }
     }
     $this->view->source = Model_Source::getSource(JO_Registry::getArray('pin_info[source_id]'));
     if ($this->view->source) {
         $this->view->source_pins = Helper_Pin::getSourcePins(JO_Registry::getArray('pin_info[source_id]'), 6, 75);
         $this->view->pin['from'] = WM_Router::create($request->getBaseUrl() . '?controller=source&source_id=' . $this->view->pin['source_id']);
     } else {
         if (JO_Registry::getArray('pin_info[repin_from]')) {
             $pin_repin = Model_Pins::getPin(JO_Registry::getArray('pin_info[repin_from]'));
             if ($pin_repin) {
                 $this->view->source['source'] = $pin_repin['board'];
                 $this->view->pin['from'] = WM_Router::create($request->getBaseUrl() . '?controller=boards&action=view&user_id=' . $pin_repin['user_id'] . '&board_id=' . $pin_repin['board_id']);
                 $this->view->source_pins = Helper_Pin::getBoardPins($pin_repin['board_id'], 9, 75);
             }
         }
     }
     $this->view->boardIsFollow = Model_Users::isFollow(array('board_id' => JO_Registry::getArray('pin_info[board_id]')));
     $this->view->follow = WM_Router::create($request->getBaseUrl() . '?controller=boards&action=follow&user_id=' . $this->view->pin['user_id'] . '&board_id=' . $this->view->pin['board_id']);
     $this->view->loged = JO_Session::get('user[user_id]');
     $this->view->pin['userFollowIgnore'] = ($this->view->pin['via'] ? $this->view->pin['via'] : $this->view->pin['user_id']) == JO_Session::get('user[user_id]');
     //		var_dump($this->view->onto_board);
     JO_Registry::set('pin_info', array());
 }
开发者ID:noikiy,项目名称:amatteur,代码行数:69,代码来源:PinController.php


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