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

Class: Programs

Source Location: /Programs.php

Class Overview


Created on 01 mars 09


Author(s):

Version:

  • 2.0

Variables

Methods



Class Details

[line 16]
Created on 01 mars 09

This class manages Programs objects.

Changes: 1.0 to 2.0: phpdoc compatible in the way to generate documentation




Tags:

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


[ Top ]


Class Variables

$approved =

[line 44]

Variable that contains approved switch



Tags:

access:  public

Type:   bool


[ Top ]

$brandID =

[line 49]

Variable that contains brand ID



Tags:

access:  public

Type:   int


[ Top ]

$database =  "itcontact"

[line 22]

Variable that contains database name



Tags:

access:  public

Type:   string


[ Top ]

$debug =  false

[line 68]

Variable that contains debug switch



Tags:

access:  public

Type:   bool


[ Top ]

$oBrand =

[line 56]

Variable that contains brand object



Tags:

access:  public
uses:  Brands

Type:   object


[ Top ]

$programID =

[line 34]

Variable that contains program ID



Tags:

access:  public

Type:   int


[ Top ]

$programname =

[line 39]

Variable that contains program name



Tags:

access:  public

Type:   string


[ Top ]

$result =

[line 62]

Variable that contains Select results



Tags:

access:  public

Type:   array


[ Top ]

$table =  "programs"

[line 27]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


constructor __construct [line 93]

Programs __construct( [array $aParams = null], [string $sAction = null])

Construction function

This function is used when object is generated. It places variables in "$this" var and can launch function

  1.  <?php
  2.  $aParams        array("programname"=>"Pages");
  3.  $oPrograms    new Programs($aParams);
  4.  echo $oPrograms->programname;
  5.  // Pages
  6.  ?>




Tags:

since:  Version 1.0
uses:  Strings


Parameters:

array   $aParams   array containing variable names and their value ($variablename => $value)
string   $sAction   string containing action to perform on object creation

[ Top ]

method getByID [line 141]

string getByID( int $this->programID, string $this->database, string $this->table)

Program by ID obtention function

This function is used to get a program by its ID Result is stored in $this->programname, $this->approved, $this->brandID and program name is returned

  1.  <?php
  2.  $oPrograms                new Programs();
  3.  $oPrograms->programID    12;
  4.  echo $oPrograms->getByID();
  5.  // Pages
  6.  ?>




Tags:

return:  program name
since:  Version 1.0
uses:  MySQL::SelectRow()


Parameters:

int   $this->programID   program ID (required)
string   $this->database   database name
string   $this->table   table name

[ Top ]

method listprograms [line 203]

int listprograms( string $this->database, string $this->table)

Program listing function

This function is used to get a listing of all programs Result is stored in $this->result and number of rows is returned

  1.  <?php
  2.  $oPrograms                new Programs();
  3.  $oPrograms->listprograms();
  4.  print_r($oPrograms->result);
  5.  // [programslist]
  6.  ?>




Tags:

return:  number of fetched rows
since:  Version 1.0
uses:  MySQL::SelectRow()


Parameters:

string   $this->database   database name
string   $this->table   table name

[ Top ]


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