pokeb / php-mvc-router

Lightweight Rails-style MVC router for PHP

This URL has Read+Write access

php-mvc-router / models / project.php
100644 20 lines (15 sloc) 0.341 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
 
class project extends model {
 
public $id = "";
public $name = "";
 
function __construct($id="") {
//Normally you'd connect to the database to fetch the object's properties here
if ($id != "") {
$this->id = $id;
$this->name = "#$this->id";
$this->is_valid = true;
}
}
 
function delete() {
}
 
}