<?php
//USING
require_once '../Class/model/PastasModel.php';

/**
 * BancosControl - Controle das pastas do sistema
 *
 * Essa classe controla as requisicoes da classe Pastas
 *
 * @version 	1.0
 * @project 	Módulo Financeiro
 * @copyright	Jay.com.br 2012
 * @access 		public
 */
class PastasControl
{
	protected $id;
	protected $action;
	protected $deletar;

	public function setId()
	{
		if (isset($_GET['id']))
		{
			$this->id = $_GET['id'];
		}
	}

	public function getId()
	{
		return $this->id;
	}

	public function setAction()
	{
		if (isset($_POST['action']))
		{
			$this->action = $_POST['action'];
		}
	}

	public function getAction()
	{
		return $this->action;
	}

	public function setDel()
	{
		if (isset($_GET['del']))
		{
			$this->deletar = $_GET['del'];
		}
	}

	public function getDel()
	{
		return $this->deletar;
	}

	//Constructor
	public function __construct()
	{

	}

	public function GetData()
	{
		$result = new PastasModel();
		$result->setId($_POST['Id']);
		$result->setNumero($_POST['numero']);
		$result->setNome($_POST['nome']);
		$result->setDetalhe($_POST['detalhe']);

		return $result->save();
	}
}

?>