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

Class: Estate_Photos

Source Location: /Estate_Photos.php

Class Overview

PHP_Objects
   |
   --Estate_Photos

Created on 04 may 09


Author(s):

Version:

  • 1.3

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 Photos objects.

CHANGES: 1.2 -> 1.3: 08 may 09 Added PhotoAdd() function Added debug value 1.1 -> 1.2: 07 may 09 Added PhotosList() function 1.0 -> 1.1: 06 may 09 Added to RealEstates package




Tags:

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


[ Top ]


Class Variables

$database =  "estates"

[line 26]

Variable that contains database name



Tags:

access:  protected

Type:   string


[ Top ]

$inserted_ts =

[line 62]

Variable that contains row insertion timestamp



Tags:

access:  protected

Type:   int


[ Top ]

$photodescr =

[line 50]

Variable that contains photo description



Tags:

access:  protected

Type:   int


[ Top ]

$photofilename =

[line 56]

Variable that contains photo filename



Tags:

access:  protected

Type:   int


[ Top ]

$photoID =

[line 38]

Variable that contains photo ID



Tags:

access:  protected

Type:   int


[ Top ]

$photoname =

[line 44]

Variable that contains photo name



Tags:

access:  protected

Type:   int


[ Top ]

$table =  "estate_photos"

[line 32]

Variable that contains table name



Tags:

access:  protected

Type:   string


[ Top ]

$updated_ts =

[line 68]

Variable that contains row modification timestamp



Tags:

access:  protected

Type:   int


[ Top ]



Class Methods


method PhotoAdd [line 211]

object photo PhotoAdd( string $photoname, string $photodescr, string $photofilename, string $this->database, string $this->table)

Photo add function

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

  1.  <?php
  2.  $oPhoto            new Estate_Photos();
  3.  $oPhoto->PhotoAdd($photoname,$photodescr,$photofilename);
  4.  ?>




Tags:

return:  object
since:  Version 1.2


Parameters:

string   $this->database   database name
string   $this->table   table name
string   $photoname   name of the photo
string   $photodescr   description of the photo
string   $photofilename   filename of the photo

[ Top ]

method PhotobyID [line 96]

object fetched PhotobyID( int $photoID, string $this->database, string $this->table)

Photo by ID obtention function

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

  1.  <?php
  2.  $oPhoto            new Estate_Photos();
  3.  print_r($oPhoto->PhotobyID(2));
  4.  // photoobject
  5.  ?>




Tags:

return:  photo object
since:  Version 1.0


Parameters:

string   $this->database   database name
string   $this->table   table name
int   $photoID   ID of the photo to be fetched

[ Top ]

method PhotosList [line 156]

object photo PhotosList( [string $orderrow = "photoname"], [string $order = "ASC"], string $this->database, string $this->table)

Photos list function

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

  1.  <?php
  2.  $oPhoto            new Estate_Photos();
  3.  $oPhoto->PhotosList();
  4.  print_r($oPhoto->result);
  5.  // photos array
  6.  ?>




Tags:

return:  object
since:  Version 1.2


Parameters:

string   $this->database   database name
string   $this->table   table name
string   $orderrow   row to use to order results
string   $order   order to use (ASC or DESC)

[ Top ]


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