phpDocumentor ecommerce
[ class tree: ecommerce ] [ index: ecommerce ] [ all elements ]

Class: Tax

Source Location: /myphp-1.9/myphp-1.9-ecommerce/html/component/Tax.php

Class Tax

Class Overview

Returns the calculated tax

  1. Usage:
  2. $html = new Tax($price,$rate);
  3. print $html->getHtml();
  4. Or
  5. Tax::display($price,$rate);
  6. Or
  7. $amount = Tax::get($price,$rate);
  8. Or
  9. $rate = Tax::rate($rate);
  10. Or
  11. $taxtext = Tax::text($rate);

Located in /myphp-1.9/myphp-1.9-ecommerce/html/component/Tax.php [line 35]

Object
   |
   --Html
      |
      --Tax

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Html

Html::$elements
Html::$sizeof

Inherited From Object

Object::$cachefile
Object::$html
Object::$sql

Inherited From Html

Html::Html()
Constructor
Html::add()
Add an element, the number of elements are stored internally in an array.
Html::content()
Read the content of the specified filename
Html::display()
Display the html
Html::get()
Get the complete html for a key
Html::getAttribute()
Get the complete html for an attribute, i.e. <a class="myclass" ...
Html::getElement()
Get the element at position $i in array
Html::getElements()
Get all the elements as html
Html::getHtml()
Get Html
Html::getHtmlHelp()
Get html help
Html::getSizeof()
Get the number of elements added
Html::getTag()
Get the complete html for a html tag, i.e. <p>My paragraph</p>
Html::read()
Read the content of the specified filename and language
Html::set()
Set the named attribute (key) of a class to specified value
Html::setObject()
Set the named object to the class attribute (key), with same name
Html::showsource()
Show source
Html::update()
Save the content of the specified filename and language

Inherited From Object

Object::Object()
Constructor
Object::addHtml()
Add the current html to the SourceCode object
Object::getCacheFileName()
Returns the name of the cache file name
Object::getClassName()
Returns the name of the instanciated class
Object::getHtml()
Returns the html for the element
Object::getMsg()
Get the formatted message and debug level and Log to file ?
Object::save()
Save the SQL cache file
Object::setCacheFileName()
Set the path/name of the cache file
Object::toString()
Returns the information for this class
Object::write()
Write the content to the file opened by fp

[ Top ]
Property Summary
mixed   $price  
mixed   $rate  

[ Top ]
Method Summary
Tax   Tax()   Constructor
void   display()   Display the Tax Rate
int   get()   Get the Tax
String   getHtml()   Get the tax calculation
int   getRate()   Get the Tax Rate. I.e. 25 for 25% in Denmark
decimal   getTax()   Get the tax to pay
String   getText()   Get the Tax text as html
int   rate()   Get the Tax Rate
String   text()   Get the Tax Text

[ Top ]
Properties
mixed   $price = '' [line 36]

[ Top ]
mixed   $rate = '' [line 37]

[ Top ]
Methods
Constructor Tax  [line 44]

  Tax Tax( [String $price = ''], [String $rate = '']  )

Constructor

Parameters:
String   $price:  The price to calculate tax
String   $rate:  The Tax Rate. I.e. 25 %


[ Top ]
display  [line 146]

  void display( [String $price = ''], [String $rate = '']  )

Display the Tax Rate

  1. Usage:
  2. Tax::display($price,$rate);

Parameters:
String   $price:  The price to calculate tax
String   $rate:  The Tax Rate. I.e. 25 %

API Tags:
Static:  


Redefinition of:
Html::display()
Display the html

[ Top ]
get  [line 99]

  int get( [String $price = ''], [String $rate = '']  )

Get the Tax

  1. Usage:
  2. Tax::get($price,$rate);

Parameters:
String   $price:  The price to calculate tax
String   $rate:  The Tax Rate. I.e. 25 %

API Tags:
Return:  The Tax Rate as html
Static:  


Redefinition of:
Html::get()
Get the complete html for a key

[ Top ]
getHtml  [line 82]

  String getHtml( )

Get the tax calculation


API Tags:
Return:  The tax to pay


Redefinition of:
Html::getHtml()
Get Html

[ Top ]
getRate  [line 54]

  int getRate( )

Get the Tax Rate. I.e. 25 for 25% in Denmark


API Tags:
Return:  The Tax Rate


[ Top ]
getTax  [line 72]

  decimal getTax( )

Get the tax to pay


API Tags:
Return:  The tax to pay


[ Top ]
getText  [line 62]

  String getText( )

Get the Tax text as html


API Tags:
Return:  The html


[ Top ]
rate  [line 114]

  int rate( [String $rate = '']  )

Get the Tax Rate

  1. Usage:
  2. Tax::rate($rate);

Parameters:
String   $rate:  The Tax Rate. I.e. 25 %

API Tags:
Return:  The Tax Rate as html
Static:  


[ Top ]
text  [line 130]

  String text( [String $rate = '']  )

Get the Tax Text

  1. Usage:
  2. Tax::text($rate);

Parameters:
String   $rate:  The Tax Rate. I.e. 25 %

API Tags:
Return:  The Text as html
Static:  


[ Top ]

Documentation generated on Thu, 22 Dec 2005 17:19:59 +0100 by phpDocumentor 1.3.0RC3