<?php
/*******************************************************************************
 *                    _ _ _ _
 *                   / _ _  /
 *            _ _   / /__/ /_ _   ____ _ _   _ _ _    __
 *           / _ ` /   _ _// _ ` / __// _ ` / _ \\ \ / /
 *          / _ _// /\ \  / _ _/ \_ \/ _ _// / \/ \ ` /
 *          \_ , /_/  \_\ \_ ,  /__ /\_ , /_/      \_/
 *
 *******************************************************************************
 *    Application:  eReserv
 *    Version:      6
 *    Author:       David Di Certo
 *    Website:      http://www.cogites.com
 *    Email:        contact@cogites.com
 *    Copyright:    2013 - David Di Certo
 *******************************************************************************
 *    == FR ==      La revente et la redistribution de l'application sont
 *                  strictement interdites.
 *
 *                  Vous êtes tenu d'avoir pris connaissance des
 *                  Conditions Générales de Vente disponibles sur Cogites.com
 *                  (y compris pour la version Free).
 *
 *    == EN ==      Resale and redistribution of the application are
 *                  Strictly prohibited.
 *
 *                  You are required to have read the Terms and Conditions
 *                  available on Cogites.com (including the Free version).
 *
 *******************************************************************************
*/

class TenancyVo {

	public $tenancy_id;
	public $recorddate;
	public $name;
	public $imagepath;
	public $landlord_id;
	public $landlord_name;
	public $landlord_lastname;
	public $address1;
	public $address2;
	public $zipcode;
	public $city;
	public $country;
	public $state;
	public $vat;
	public $comment;
	public $beds;
	public $field1;

    public function __construct(array $data = array())
    {
        foreach($data as $key => $value) {
			if ($key=='tenancy_id') $this->tenancy_id = $value;
			if ($key=='recorddate') $this->recorddate = $value;
			if ($key=='name') $this->name = $value;
			// if ($key=='tenancy_imagepath') $this->tenancy_imagepath = empty($value) ? "/styles/img/tenancy/no_image.jpg" : $value;
			if ($key=='imagepath') $this->imagepath = empty($value) ? "/styles/img/tenancy/no_image.jpg" : $value;
			if ($key=='landlord_id') $this->landlord_id = $value;
			if ($key=='landlord_name') $this->landlord_name = $value;
			if ($key=='landlord_lastname') $this->landlord_lastname = $value;
			if ($key=='address1') $this->address1 = $value;
			if ($key=='address2') $this->address2 = $value;
			if ($key=='zipcode') $this->zipcode = $value;
			if ($key=='city') $this->city = $value;
			if ($key=='country') $this->country = $value;
			if ($key=='state') $this->state = $value;
			if ($key=='vat') $this->vat = $value;
			if ($key=='comment') $this->comment = $value;
			if ($key=='beds') $this->beds = $value;
			if ($key=='field1') $this->field1 = $value;
	      }
    }

}
?>