<?php
require_once 'ControlDB.php';
class ControlArea {
	
	public function pegarTodosArea() {
		$area = new Area();
                $area->orderBy('titulo');
		$area->find();
		return $area;
	}
        
        public function pegarUmArea($pk) {
		$area = new Area();
		$area->get($pk);
		return $area;
	}
	
	public function salvarArea(Area $area) {
		$area->save();
		return 1;
	}
	
	public function excluirArea(Area $area) {
		$area->delete();
                return 1;
	}       
}

?>