Your browser must have JavaScript enabled in order to view this page.
 >  >
 
Welcome Guest#213 Login/register    Go to Bottom
Go to Top

Source for file credits.php

Documentation is available at credits.php

  1. <?php
  2. /**
  3.  * Credits object for monetary system
  4.  *
  5.  * DutchPIPE version 0.4; PHP version 5
  6.  *
  7.  * LICENSE: This source file is subject to version 1.0 of the DutchPIPE license.
  8.  * If you did not receive a copy of the DutchPIPE license, you can obtain one at
  9.  * http://dutchpipe.org/license/1_0.txt or by sending a note to
  10.  * license@dutchpipe.org, in which case you will be mailed a copy immediately.
  11.  *
  12.  * @package    DutchPIPE
  13.  * @subpackage dpuniverse_obj
  14.  * @author     Lennert Stock <ls@dutchpipe.org>
  15.  * @copyright  2006, 2007 Lennert Stock
  16.  * @license    http://dutchpipe.org/license/1_0.txt  DutchPIPE License
  17.  * @version    Subversion: $Id: credits.php 308 2007-09-02 19:18:58Z ls $
  18.  * @link       http://dutchpipe.org/manual/package/DutchPIPE
  19.  * @see        DpHeap
  20.  */
  21.  
  22. /**
  23.  * Builts upon the standard DpObject class
  24.  */
  25. inherit(DPUNIVERSE_STD_PATH 'DpHeap.php');
  26.  
  27. /**
  28.  * Credits object for monetary system
  29.  *
  30.  * Creates the following DutchPIPE properties:<br />
  31.  *
  32.  * - boolean <b>isCredits</b> - Set to TRUE
  33.  * - boolean <b>isNoSell</b> - Set to TRUE
  34.  *
  35.  * @package    DutchPIPE
  36.  * @subpackage dpuniverse_obj
  37.  * @author     Lennert Stock <ls@dutchpipe.org>
  38.  * @copyright  2006, 2007 Lennert Stock
  39.  * @license    http://www.dutchpipe.org/license/1_0.txt  DutchPIPE License
  40.  * @version    Release: 0.2.1
  41.  * @link       http://www.dutchpipe.org/manual/package/DutchPIPE
  42.  * @see        DpObject
  43.  */
  44. final class Credits extends DpHeap
  45. {
  46.     /**
  47.      * Sets up the object at object creation time
  48.      */
  49.     public function createDpHeap()
  50.     {
  51.         $this->heapTitleSingular dp_text('1 credit');
  52.         $this->heapTitlePlural dp_text('%d credits');
  53.  
  54.         $this->titleImg DPUNIVERSE_IMAGE_URL 'credits.gif';
  55.         $this->titleImgWidth 30;
  56.         $this->titleImgHeight 26;
  57.  
  58.         $this->addId(explode('#'dp_text('credit#credits')));
  59.         $this->body '<img src="' DPUNIVERSE_IMAGE_URL
  60.             . 'credits_body.gif" width="43" height="36" border="0" alt="" '
  61.             . 'align="left" style="margin-right: 15px" /><br />'
  62.             . dp_text('It is real money!');
  63.  
  64.         if (WEIGHT_TYPE_NONE !== WEIGHT_TYPE{
  65.             if (WEIGHT_TYPE_ABSTRACT === WEIGHT_TYPE{
  66.                 $this->heapWeightModifier 0.001;
  67.             elseif (WEIGHT_TYPE_METRIC === WEIGHT_TYPE{
  68.                 $this->heapWeightModifier 1;
  69.             elseif (WEIGHT_TYPE_USA === WEIGHT_TYPE{
  70.                 $this->heapWeightModifier 0.035;
  71.             }
  72.         }
  73.  
  74.         if (VOLUME_TYPE_NONE !== VOLUME_TYPE{
  75.             if (VOLUME_TYPE_ABSTRACT === VOLUME_TYPE{
  76.                 $this->heapVolumeModifier 0.001;
  77.             elseif (VOLUME_TYPE_METRIC === VOLUME_TYPE{
  78.                 $this->heapVolumeModifier 1;
  79.             elseif (VOLUME_TYPE_USA === VOLUME_TYPE{
  80.                 $this->heapVolumeModifier 0.035;
  81.             }
  82.         }
  83.  
  84.         $this->heapValueModifier 1;
  85.         $this->isCredits new_dp_property(TRUE);
  86.         $this->isNoSell new_dp_property(TRUE);
  87.  
  88.         $this->amount 1;
  89.     }
  90. }
  91. ?>

Documentation generated on Mon, 03 Sep 2007 22:18:45 +0200 by phpDocumentor 1.3.0RC6

Click me!
Guest#213
 
 
 
  Go to Top
 
 
Input Field OptionsClose Input Field Go to Top
 
Legal Notices | Copyright © 2006, 2007 Lennert Stock. All rights reserved. Last update: Mon Sep 03 2007, 21:50 CET.