Rename a few classes, fix bugs, fix syntax

This commit is contained in:
osaajani 2019-11-06 20:34:26 +01:00
parent 7cb963b8cf
commit bda1c7ddfd
18 changed files with 106 additions and 37 deletions

View file

@ -17,11 +17,11 @@ namespace controllers\internals;
*/
class Sent extends \descartes\InternalController
{
private $model_sended;
private $model_sent;
public function __construct(\PDO $bdd)
{
$this->model_sended = new \models\Sent($bdd);
$this->model_sent = new \models\Sent($bdd);
}
/**
@ -35,7 +35,7 @@ namespace controllers\internals;
public function list($nb_entry = false, $page = false)
{
//Recupération des sendedes
return $this->model_sended->list($nb_entry, $nb_entry * $page);
return $this->model_sent->list($nb_entry, $nb_entry * $page);
}
/**
@ -48,7 +48,7 @@ namespace controllers\internals;
public function gets($ids)
{
//Recupération des sendedes
return $this->model_sended->gets($ids);
return $this->model_sent->gets($ids);
}
/**
@ -60,7 +60,7 @@ namespace controllers\internals;
*/
public function get_lasts_by_date($nb_entry = false)
{
return $this->model_sended->get_lasts_by_date($nb_entry);
return $this->model_sent->get_lasts_by_date($nb_entry);
}
/**
@ -73,7 +73,7 @@ namespace controllers\internals;
public function get_by_target($target)
{
//Recupération des sendeds
return $this->model_sended->get_by_target($target);
return $this->model_sent->get_by_target($target);
}
/**
@ -86,7 +86,7 @@ namespace controllers\internals;
*/
public function delete($id)
{
return $this->model_sended->delete($id);
return $this->model_sent->delete($id);
}
/**
@ -98,7 +98,7 @@ namespace controllers\internals;
*/
public function create($sended)
{
return $this->model_sended->create($sended);
return $this->model_sent->create($sended);
}
/**
@ -108,7 +108,7 @@ namespace controllers\internals;
*/
public function count()
{
return $this->model_sended->count();
return $this->model_sent->count();
}
/**
@ -120,7 +120,7 @@ namespace controllers\internals;
*/
public function count_by_day_since($date)
{
$counts_by_day = $this->model_sended->count_by_day_since($date);
$counts_by_day = $this->model_sent->count_by_day_since($date);
$return = [];
foreach ($counts_by_day as $count_by_day)