function getSummaryLine() { $base = parent::getSummaryLine(); $base .= " Time:{$this->playLength}"; return $base; }
function getSummaryLine() { $base = parent::getSummaryLine(); $base .= ": page count - {$this->numPages}"; return $base; }
public function getSummaryLine() { $base = parent::getSummaryLine(); $base .= ": playing time - {$this->getPlayLength()}"; return $base; }
function getSummaryLine() { $base = parent::getSummaryLine(); $base .= " Время проигрывания {$this->playLength}"; return $base; }
public function getSummaryLine() { $base = parent::getSummaryLine(); $base .= ": {$this->numPages} стр."; return $base; }
public function getSummaryLine() { $base = parent::getSummaryLine(); $base .= ": page count - {$this->getNumberOfPages()}"; return $base; }
{ return $this->numPages; } function getPlayLength() { return $this->playLength; } function getProducer() { return "{$this->producerFirstName}" . " {$this->producerMainName}"; } function getSummaryLine() { $base = "{$this->title} ( {$this->producerMainName}, "; $base .= "{$this->producerFirstName} )"; if ($this->type == 'book') { $base .= ": page count - {$this->numPages}"; } else { if ($this->type == 'cd') { $base .= ": playing time - {$this->playLength}"; } } return $base; } } $product1 = new ShopProduct("cd1", "bob", "bobbleson", 4, null, 50); print $product1->getSummaryLine(); print "\n"; $product2 = new ShopProduct("book1", "harry", "harrelson", 4, 30); print $product2->getSummaryLine(); print "\n";
function getSummaryLine() { $base = parent::getSummaryLine(); $base .= ": " . $this->numPages . " стр."; return $base; }