Example #1
0
 public static function save($args) {
     
     if( count($args) != 3 ) return false;
     
     if( $args[2] ){
         $item = array(ModelHandler::getEmptyItem("Posts"));
         
     }else{
         $item = ModelHandler::get("Posts", array($args[0]));
     }
     foreach ($args[1] as $key => $value) {
         $item[0]->bean[$key] = $value;
     }
     
     return ModelHandler::save($item[0]);
     
 }
Example #2
0
 public static function save(Item $item) {
     return ModelHandler::save($item[0]);
     
 }