title: PHP object oriented hotel application
body: <p>At the moment I'm programming an object oriented hotel application to learn OOP.
  I chose this because in my book (PHP Design Patterns from O'Reilly) they programmed a car rental company.
  Now I'm finished with the basic business logic but I still have some problems.</p>
  
  <p>In the Hotel class are the following methods:</p>
  
  <pre><code>//All public functions, left it hhere cause of the length
  checkOut( HotelRoom $room, DateTime $from, DateTime $to )
  changeRoom( HotelRoom $oldRoom, HotelRoom $newRoom, HotelCustomer $customer, DateTime $from, DateTime $to)
  checkOut( HotelRoom $room, DateTime $from, DateTime $to )
  </code></pre>
  
  <p>So for every step I do (reserving, changing the room or checkout) I have to pass the HotelRoom as a parameter. Every room has an id and a number.
  Would it better to implement a method <code>addRoom(HotelRoom $room)</code> and store all rooms in a protected property <code>$rooms</code> array and then only pass the <code>HotelRoom::$id</code> for the methods or is there a better way?</p>
  
  <p>I'm relatively new to OOP and just want to now what is a good practice.</p>