mysite /www/application/models/link.php

Language PHP Lines 25
MD5 Hash 83f581675624a76d094adbe66ca4ed03
Repository https://github.com/chardcastle/mysite.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php defined('SYSPATH') or die('No direct script access.');
 
class Link_Model extends App_Model {
	 	
 	public $title = ""; 	
 	public $destination = "";
 	
	public function __construct()
	{
		// load database library into $this->db (can be omitted if not required)
		parent::__construct();		
	}
	public function loadFromLocalSource($content){        
		//preg_match('/\"link-text\"\:\"(.*)\",/i',$content,$this->result);
		$this->title = $content["link-text"];
		//preg_match('/\"link-url\"\:\"(.*)\",/i',$content,$this->result);
		$this->destination = $content["link-url"];
		// view
		$view = new View("item_summary/link");
		$view->set("link",$this);
		return $view->render();		
	}
 
}
Back to Top