<?php
namespace Property;

require_once 'Object.php';
require_once 'IKitchen.php';
use \Main\Object;		

class House extends Object
{
	// Attributes
	private $_kitchen;
	
	// Constructor
	
	// This a bad approach
	// We are mixing the "concern of application instantiation" with the 
	// "concern of application logic".
	// In order to do testing we need to be able to test the House class with a
	// fake Kitchen.
	/*
	public function __construct()
	{
		$this->_kitchen = new Kitchen();
	}
	*/
	
	// Asking for your dependencies instead of constructing them within the application logic
	// is known as "Dependency Injection".
	public function __construct(IKitchen $kitchen)
	{
		$this->_kitchen = $kitchen;
	}
	
	// Methods for the properties
	// Getters and Setters
	
	// Methods
	public function LockUp()
	{
		$this->_kitchen->LockDoor();
		$this->_kitchen->LockWindows();	
		return;
	}	
}
?>