RealEstates
[ class tree: RealEstates ] [ index: RealEstates ] [ all elements ]

Class: Estate_Rooms

Source Location: /Estate_Rooms.php

Class Overview

PHP_Objects
   |
   --Estate_Rooms

Created on 04 may 09


Author(s):

Version:

  • 1.2

Variables

Methods


Inherited Variables

Inherited Methods

Class: PHP_Objects

PHP_Objects::__construct()
Construction function
PHP_Objects::getDB()
Database obtention function
PHP_Objects::getTable()
Table obtention function
PHP_Objects::setDebug()
Debug setting function

Class Details

[line 20]
Created on 04 may 09

This class manages Real Estate Rooms objects.

CHANGES: 1.1 -> 1.2: 08 may 09 Added RoomAdd() function Added debug value 1.0 -> 1.1: 06 may 09 Added to RealEstates package added RoomsList() function




Tags:

author:  Pierre-Dominique Vienne <pvienne@me.com>
version:  1.2
license:  GNU Public License


[ Top ]


Class Variables

$database =  "estates"

[line 26]

Variable that contains database name



Tags:

access:  protected

Type:   string


[ Top ]

$floorID =

[line 68]

Variable that contains floor ID



Tags:

access:  protected

Type:   int


[ Top ]

$heated =  1

[line 74]

Variable that contains switch defining if room is heated



Tags:

access:  protected

Type:   int


[ Top ]

$inserted_ts =

[line 92]

Variable that contains row insertion timestamp



Tags:

access:  protected

Type:   int


[ Top ]

$roomadjustment =  1

[line 56]

Variable that contains room adjustment value



Tags:

access:  protected

Type:   int


[ Top ]

$roomdescr =

[line 50]

Variable that contains room description



Tags:

access:  protected

Type:   string


[ Top ]

$roomID =

[line 38]

Variable that contains room ID



Tags:

access:  protected

Type:   int


[ Top ]

$roomname =

[line 44]

Variable that contains room name



Tags:

access:  protected

Type:   string


[ Top ]

$roomsurface =

[line 86]

Variable that contains room surface



Tags:

access:  protected

Type:   int


[ Top ]

$roomtypeID =

[line 62]

Variable that contains room type ID



Tags:

access:  protected

Type:   int


[ Top ]

$roomvolume =

[line 80]

Variable that contains room volume



Tags:

access:  protected

Type:   int


[ Top ]

$table =  "estate_rooms"

[line 32]

Variable that contains table name



Tags:

access:  protected

Type:   string


[ Top ]

$updated_ts =

[line 98]

Variable that contains row modification timestamp



Tags:

access:  protected

Type:   int


[ Top ]



Class Methods


method RoomAdd [line 261]

object room RoomAdd( string $roomname, string $roomdescr, float $roomadjustment, int $roomtypeID, int $floorID, int $heated, int $roomvolume, int $roomsurface, string $this->database, string $this->table)

Room add function

This function is used to add a room to database. Result is stored in $this and returned

  1.  <?php
  2.  $oRoom            new Estate_Rooms();
  3.  $oRoom->RoomAdd($roomname,$roomdescr,$roomadjustment,$roomtypeID,$floorID,$heated,$roomvolume,$roomsurface);
  4.  ?>




Tags:

return:  object
since:  Version 1.2


Parameters:

string   $this->database   database name
string   $this->table   table name
string   $roomname   name of the room
string   $roomdescr   description of the room
float   $roomadjustment   room adjustment
int   $roomtypeID   ID of the type of the room
int   $floorID   ID of the floor
int   $heated   Switch defining if the room is heated or not
int   $roomvolume   volume of the room
int   $roomsurface   surface of the room

[ Top ]

method RoombyID [line 126]

object fetched RoombyID( int $roomID, string $this->database, string $this->table)

Room by ID obtention function

This function is used to get room object by its ID from database. Result is stored in $this and returned

  1.  <?php
  2.  $oRoom            new Estate_Rooms();
  3.  print_r($oRoom->RoombyID(2));
  4.  // roomobject
  5.  ?>




Tags:

return:  room object
since:  Version 1.0


Parameters:

string   $this->database   database name
string   $this->table   table name
int   $roomID   ID of the room to be fetched

[ Top ]

method RoomsList [line 196]

object room RoomsList( [string $orderrow = "roomname"], [string $order = "ASC"], string $this->database, string $this->table)

Rooms list obtention function

This function is used to get rooms list from database. Result is stored in $this and returned

  1.  <?php
  2.  $oRoom            new Estate_Rooms();
  3.  $oRoom->RoomsList();
  4.  print_r($oRoom->result);
  5.  // rooms array
  6.  ?>




Tags:

return:  object
since:  Version 1.1


Parameters:

string   $this->database   database name
string   $this->table   table name
string   $orderrow   row to order results
string   $order   order to use

[ Top ]


Documentation generated on Wed, 26 Aug 2009 12:30:07 +0200 by phpDocumentor 1.4.1