<?php
namespace Tasks\task3;
use Tasks\task3\Strategy\CostStrategy;
class Lesson
{
protected $duration;
protected $costStrategy;
public function __construct($duration, CostStrategy $strategy)
{
$this->duration = $duration;
$this->costStrategy = $strategy;
}
public function cost()
{
return $this->costStrategy->cost($this);
}
public function chargeType()
{
return $this->costStrategy->chargeType();
}
public function getDuration()
{
return $this->duration;
}
}
$.ajax ({
method: 'get',
url: 'ajax.php',
cache: true,
data: { mod:mod, id:id, },
success: function (c) {
$('#content').html (c);
},
}).done (function () {
return false;
});