File: examples/blog/app/blog/models/tagsModel.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil  >  PHP Skeleton Framework  >  examples/blog/app/blog/models/tagsModel.php  >  Download  
File: examples/blog/app/blog/models/tagsModel.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 5 years ago
Size: 453 bytes
 

Contents

Class file image Download
<?php

class tagsModel extends A_Model {
   
    protected
$dbh = null;
   
    public function
__construct($db){
       
$this->dbh = $db;
       
$this->addField(new A_Model_Field('id'));
       
$this->addField(new A_Model_Field('name'));
    }
   
    public function
save(){
       
// if doesn't exist yet create
       
if(!$this->get('id')){
           
// insert new
       
} else {
           
// update
       
}
    }
   
    public function
find($id){}
    public function
findBy($someArgs){}
    public function
delete($id){}
   
}

For more information send a message to info at phpclasses dot org.