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

Class: EW_Manufacturers

Source Location: /EW_Manufacturers.php

Class Overview


Created on 01 mars 09


Author(s):

Version:

  • 2.2

Variables

Methods



Class Details

[line 21]
Created on 01 mars 09

This class manages EVS Window Manufacturers objects.

Changes: 2.1 to 2.2: 16 jun 09 update: ManufacturerList() function, added $this->man_name and $this->man_code search values, added $this->list_limitfrom and $this->list_limitqty 2.0 to 2.1: 15 jun 09 added: ManufacturerByID() function added: ManufacturerByCode() function added: ManufacturersList() function 1.0 to 2.0: phpdoc compatible in the way to generate documentation




Tags:

author:  Pierre-Dominique Vienne <pvienne@me.com>
version:  2.2
usedby:  EW_Manufacturer_Models::$oManufacturer
license:  GNU Public License


[ Top ]


Class Variables

$database =  "prysma"

[line 27]

Variable that contains database name



Tags:

access:  public

Type:   string


[ Top ]

$debug =  false

[line 76]

Variable that contains debug switch



Tags:

access:  public

Type:   bool


[ Top ]

$list_limitfrom =  0

[line 65]

Variable that contains List limit from



Tags:

access:  public

Type:   int


[ Top ]

$list_limitqty =  10

[line 70]

Variable that contains List limit quantity



Tags:

access:  public

Type:   int


[ Top ]

$man_code =

[line 49]

Variable that contains manufacturer code



Tags:

access:  public

Type:   string


[ Top ]

$man_id =

[line 39]

Variable that contains manufacturer ID



Tags:

access:  public

Type:   int


[ Top ]

$man_name =

[line 44]

Variable that contains manufacturer name



Tags:

access:  public

Type:   string


[ Top ]

$peo_id_supplier =

[line 54]

Variable that contains supplier people ID



Tags:

access:  public

Type:   int


[ Top ]

$result =

[line 60]

Variable that contains Select result



Tags:

access:  public

Type:   array


[ Top ]

$table =  "ew_manufacturer"

[line 32]

Variable that contains table name



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


constructor __construct [line 101]

EW_Manufacturers __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("man_name"=>"Manufacturer name");
  3.  $oEW_Manufacturers    new EW_Manufacturers($aParams);
  4.  echo $oEW_Manufacturers->man_name;
  5.  // Manufacturer name
  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 ManufacturerAdd [line 411]

int ManufacturerAdd( string $this->database, string $this->table, string $this->man_name, string $this->man_code, string $this->peo_id_supplier)

Manufacturer addition function

This function is used to add a model to database. Result is returned.

  1.  <?php
  2.  $aValues                    array("man_name"=>$man_name,"man_code"=>$man_code,"peo_id_supplier"=>$peo_id_supplier);
  3.  $oEW_Manufacturers        new EW_Manufacturers($aValues);
  4.  echo $oEW_Manufacturers->ManufacturerAdd();
  5.  // manufacturerid
  6.  ?>




Tags:

return:  ID of the manufacturer
since:  Version 2.1
uses:  MySQL::InsertDatas()


Parameters:

string   $this->database   database name
string   $this->table   table name
string   $this->man_name   name of the manufacturer (required)
string   $this->man_code   code of the manufacturer (required)
string   $this->peo_id_supplier   ID of the supplier user (required)

[ Top ]

method ManufacturerByCode [line 213]

string ManufacturerByCode( string $this->man_code, string $this->database, string $this->table)

Manufacturer by manufacturer code obtention function

This function is used to get a EW_Manufacturer by its manufacturer code. Result is stored in $this and manufacturer name is returned

  1.  <?php
  2.  $aParams                    array("man_code"=>"foocode");
  3.  $oEW_Manufacturers        new EW_Manufacturers($aParams,"ManufacturerByCode");
  4.  echo $oEW_Manufacturers->man_name;
  5.  // Manufacturer name
  6.  ?>




Tags:

return:  manufacturer name
since:  Version 2.1
uses:  MySQL::SelectRow()


Parameters:

string   $this->man_code   code of the manufacturer to be fetched (required)
string   $this->database   database name
string   $this->table   table name

[ Top ]

method ManufacturerByID [line 149]

string ManufacturerByID( int $this->man_id, string $this->database, string $this->table)

Manufacturer by ID obtention function

This function is used to get a EW_Manufacturer by its ID. Result is stored in $this and manufacturer name is returned

  1.  <?php
  2.  $aParams                    array("man_id"=>12);
  3.  $oEW_Manufacturers        new EW_Manufacturers($aParams,"ManufacturerByID");
  4.  echo $oEW_Manufacturers->man_name;
  5.  // Model name
  6.  ?>




Tags:

return:  manufacturer name
since:  Version 2.1
uses:  MySQL::SelectRow()


Parameters:

int   $this->man_id   ID of the manufacturer to be fetched (required)
string   $this->database   database name
string   $this->table   table name

[ Top ]

method ManufacturersList [line 269]

int ManufacturersList( string $this->database, string $this->table, string $this->man_name)

Manufacturer listing function

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

  1.  <?php
  2.  $oEW_Manufacturers        new EW_Manufacturers();
  3.  $oEW_Manufacturers->ManufacturersList();
  4.  print_r($oEW_Manufacturers->result);
  5.  // [manufacturerslisting]
  6.  ?>




Tags:

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


Parameters:

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

[ Top ]

method ManufacturerUpdate [line 346]

int ManufacturerUpdate( string $this->database, string $this->table, int $this->man_id, string $this->man_name, string $this->man_code, int $this->peo_id_supplier)

Manufacturer modification function

This function is used to update a manufacturer to database. Result is returned.

  1.  <?php
  2.  $aValues                    array("man_id"=>$man_id,"man_name"=>$man_name,"man_code"=>$man_code,"peo_id_supplier"=>$peo_id_supplier);
  3.  $oEW_Manufacturers        new EW_Manufacturers($aValues);
  4.  echo $oEW_Manufacturers->ManufacturerUpdate();
  5.  // manufacturerid
  6.  ?>




Tags:

return:  ID of the manufacturer
since:  Version 2.1
uses:  MySQL::UpdateRow()


Parameters:

string   $this->database   database name
string   $this->table   table name
int   $this->man_id   ID of manufacturer (required)
string   $this->man_name   name of the manufacturer (required)
string   $this->man_code   code of the manufacturer (required)
int   $this->peo_id_supplier   user ID of the supplier (required)

[ Top ]


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