Example #1
0
 public function getTotal($display = 'retail', $formatted = false)
 {
     if (!$this->price) {
         $this->getPrice();
     }
     $total = $this->price->get($display) * $this->qty;
     if ($formatted) {
         $total = $this->app->number->currency($total, array('currency' => 'USD'));
     }
     return $total;
 }
Example #2
0
 /**
  * Decides if the given method is a good one
  *
  * @param [string] $method Name of method to be called
  * @return [boolean] $is_good_method
  */
 private static function isGoodMethod($method)
 {
     $is_good_method = $method->isPublic() && !$method->isConstructor() && !$method->isStatic();
     return $is_good_method;
 }