-
Notifications
You must be signed in to change notification settings - Fork 0
Models
hectorl edited this page Nov 6, 2012
·
1 revision
All controllers are inside the application/models/ folder.Models has all the data access and data manipulations. They are loaded from controllers using the line:
$this->load_model([the_model])
After that, the model can be used like this:
$this->[the_model]->[method]
It basic structure is:
namespace models;
class Video
{
private $smarty;
public function __construct() {
}
/*
* There is no default method. In this case, we search for a video
*
* @param int $video_id Video ID
*/
public function get_video($video_id){
//Search for the video data and returns something
}
}