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


PHP Issue::load方法代码示例

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


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

示例1: getAncestors

 /**
  * Get complete parent list for issue
  * @return array
  */
 public function getAncestors()
 {
     if ($this->_heirarchy !== null) {
         return $this->_heirarchy;
     }
     $issues = array();
     $issues[] = $this;
     $issue_ids = array($this->get("id"));
     $parent_id = $this->parent_id;
     while ($parent_id) {
         // Catch infinite loops early on, in case server isn't running linux :)
         if (in_array($parent_id, $issue_ids)) {
             $f3 = \Base::instance();
             $f3->set("error", "Issue parent tree contains an infinite loop. Issue {$parent_id} is the first point of recursion.");
             break;
         }
         $issue = new Issue();
         $issue->load($parent_id);
         if ($issue->id) {
             $issues[] = $issue;
             $parent_id = $issue->parent_id;
             $issue_ids[] = $issue->id;
         } else {
             // Handle nonexistent issues
             $f3 = \Base::instance();
             $f3->set("error", "Issue #{$issue->id} has a parent issue #{$issue->parent_id} that doesn't exist.");
             break;
         }
     }
     $this->_heirarchy = array_reverse($issues);
     return $this->_heirarchy;
 }
开发者ID:svenbw,项目名称:phproject,代码行数:36,代码来源:issue.php

示例2: delete

 public function delete($issue_id)
 {
     $this->load->model('Issue');
     $issue = new Issue();
     $issue->load($issue_id);
     if (!$issue->issue_id) {
         show_404();
     }
     $issue->delete();
     $this->load->view('bootstrap/main', ['main' => 'magazines/magazine_deleted', 'issue_id' => $issue_id]);
 }
开发者ID:TraianAlex,项目名称:ci31,代码行数:11,代码来源:magazine.php

示例3: index

	/**
	* Index page for Magazine controller.
	*/
	public function index() {
		/*// echo '<h2>My magazines</h2>';
		$this->load->model('Publication');
		$this->Publication->publication_name = 'Sandy Shore'; // create the record
		$this->Publication->save();
		// print_r($this->Publication);
		echo '<tt><pre>' . var_export($this->Publication,TRUE) . '<pre><tt>';

		$this->load->model('Issue');
		$issue = new Issue();
		$issue->publication_id = $this->Publication->publication_id;
		$issue->issue_number = 2;
		$issue->issue_date_publication = date('2015-02-01');
		$issue->save();
		echo '<tt><pre>' . var_export($issue,TRUE) . '<pre><tt>';

		$this->load->view('magazines');
		// $this->load->view('magazines');*/

		$data = array();

		$this->load->model('Publication');
		$publication = new Publication();
		$publication->load(2);
		$data['publication'] = $publication;

		$this->load->model('Issue');
		$issue = new Issue();
		$issue->load(2);
		$data['issue'] = $issue;

		$this->load->view('magazines');
		$this->load->view('magazine',$data);

		// echo "<pre>";
		// echo print_r($data);
		// echo "</pre>";

	}
开发者ID:hasanmbstu13,项目名称:Codeigniter,代码行数:42,代码来源:magazine.php

示例4: Issue

 function view_rapport()
 {
     require 'vendor/autoload.php';
     $this->load->helper('html');
     $this->load->helper('url');
     $this->load->view('bootstrap/header');
     $this->load->view('bootstrap/nav');
     $this->load->model(array('Issue', 'Publication'));
     $this->load->model("extract");
     $issue = new Issue();
     //$this->load->library('MY_Chart');
     //$this->load->My_Chart->load();
     $issue->load($issue_id);
     if (!$issue->issue_id) {
         show_404();
     }
     $publication = new Publication();
     $publication->load($issue->publication_id);
     $table1 = $this->extract->extract_csv('uploads/' . $issue->issue_cover);
     foreach ($table1 as $table) {
         $period = array_shift($table);
         foreach ($table as $value) {
             //$period = array_shift($value);
             //unset($value[0]);
             $data[] = $value;
             //print_r($value);
         }
     }
     foreach ($data as $key) {
         $topsökord[] = $key['Sökord'];
         $topklicks[] = $key['Klick'];
     }
     $top = array_combine($topsökord, $topklicks);
     arsort($top);
     array_shift($top);
     $top5 = array_slice($top, 0, 5);
     /*
     		foreach($data as $key) {
     			$topsökord[] = $data;
     			$topklicks[] = $key;
     		}*/
     while ($sökord = current($top5)) {
         $sökordtop[] = key($top5);
         $klickstop[] = $sökord;
         next($top5);
     }
     $lava = new Lavacharts();
     // See note below for Laravel
     $finances = $lava->DataTable();
     $finances->addStringColumn('sökord')->addNumberColumn('Klick')->setDateTimeFormat('Y')->addRow(array($sökordtop[0], $klickstop[0]))->addRow(array($sökordtop[1], $klickstop[1]))->addRow(array($sökordtop[2], $klickstop[2]))->addRow(array($sökordtop[3], $klickstop[3]))->addRow(array($sökordtop[4], $klickstop[4]));
     $columnchart = $lava->ColumnChart('Finances')->setOptions(array('datatable' => $finances, 'title' => 'Top 5 sökord', 'colors' => ['#FF0000'], 'titleTextStyle' => $lava->TextStyle(array('color' => '#FF0000', 'fontSize' => 20))));
     $this->load->view('magazine', array('issue' => $issue, 'foretagsnamn' => $issue->foretagsnamn, 'table1' => $table1, 'columnchart' => $columnchart, 'lava' => $lava, 'publication' => $publication));
     $this->load->helper('url');
     $this->load->view('bootstrap/footer');
     $data = $this->customers_model->editFöretagsinformation($_REQUEST['id']);
     //echo $id;
     //print_r($data);
     if (isset($_REQUEST['search_option']) && $_REQUEST['search_option'] != "") {
         $search_option = $_REQUEST['search_option'];
         $get_search = $_REQUEST['get_search'];
     } else {
         $search_option = "";
         $get_search = "";
     }
     $total = $this->customers_model->gettotalCustomers();
     /* Load the 'pagination' library */
     $this->load->library('pagination');
     /* Set the config parameters */
     $config['base_url'] = base_url() . "index.php/dashboard/index";
     $config['total_rows'] = $total;
     $config['per_page'] = 5;
     $config["uri_segment"] = 3;
     $this->pagination->initialize($config);
     $page = $this->uri->segment(3) ? $this->uri->segment(3) : 0;
     /* Setup the variables that will be passed to the view */
     $data = array('rows' => $this->customers_model->getCustomers($search_option, $get_search, $config["per_page"], $page), 'pages' => $this->pagination->create_links());
     $this->load->view('includes/header', $data);
     //redirect('customers/customers_information');
     $data["customers_information"] = $this->customers_model->getdataCustomers();
     $data["supplier_lists"] = $this->modeladmin->Get_supplierDetails();
     $data["billing_duration"] = $this->modeladmin->Get_billingdetails();
     $data["getcontacttype"] = $this->customers_model->getcontractType();
     $this->load->view('customers/customers_information', $data);
     //$this->load->view('dashboard/index',$data);
     $this->load->view('includes/footer');
 }
开发者ID:alienwizard,项目名称:MediahelpCRM,代码行数:86,代码来源:customers.php

示例5: save_issue

 private function save_issue()
 {
     $this->load->model('Issue');
     $issue = new Issue();
     $id = $this->input->post('issue_id');
     if (!empty($id)) {
         $issue->load($id);
     }
     $issue->issue_number = intval($this->input->post('issue_number'));
     $issue->issue_date_publication = $this->input->post('issue_date_publication');
     $issue->save();
     return $issue;
 }
开发者ID:logsearchernet,项目名称:ci-2.2.5,代码行数:13,代码来源:magazine.php

示例6: delete

 public function delete($issue_id)
 {
     $this->load->helper('url');
     $this->load->library('session');
     $this->load->model('My_User');
     $this->load->library('table');
     $this->load->model(array('Issue', 'Publication'));
     $this->load->view('bootstrap/header');
     $this->load->helper('html');
     $this->load->model(array('Issue'));
     $issue = new Issue();
     $issue->load($issue_id);
     if (!$issue->issue_id) {
         show_404();
     }
     $issue->delete();
     $this->load->view('issue_deleted', array('issue_id' => $issue_id));
     $this->load->view('bootstrap/footer');
 }
开发者ID:syedashadi,项目名称:Magazines,代码行数:19,代码来源:magazine.php


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