68 lines
1.5 KiB
PHP
68 lines
1.5 KiB
PHP
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
class Inleiding
|
|
{
|
|
private $CI;
|
|
private $school;
|
|
private $naam;
|
|
private $schoolnaam;
|
|
private $details;
|
|
private $bg;
|
|
private $valtonder_id;
|
|
private $bgid;
|
|
private $inleiding;
|
|
|
|
|
|
public function __construct($orgid)
|
|
{
|
|
$this->CI =& get_instance();
|
|
$this->orgid = $orgid;
|
|
$this->handle();
|
|
}
|
|
|
|
public function getInleiding()
|
|
{
|
|
return $this->inleiding;
|
|
}
|
|
|
|
private function handle()
|
|
{
|
|
$this->setSchool();
|
|
$this->setSchoolNaam();
|
|
$this->setSchoolDetails();
|
|
$this->setBGid();
|
|
$this->setBGNaam();
|
|
$this->setInleiding();
|
|
}
|
|
|
|
private function setSchool(){
|
|
$this->school = $this->CI->Organisaties_model->get_record_by_id($this->orgid);
|
|
}
|
|
|
|
private function setSchoolNaam(){
|
|
$this->schoolnaam = $this->school->naam;
|
|
}
|
|
|
|
private function setSchoolDetails(){
|
|
$this->details = $this->CI->Schooldetails_model->get_details($this->orgid);
|
|
}
|
|
|
|
private function setBGid(){
|
|
$this->bgid = $this->school->valtonder_id;
|
|
}
|
|
|
|
private function setBGNaam(){
|
|
$this->bg = $this->CI->Organisaties_model->get_fieldvalue(["id" => $this->bgid], "naam");
|
|
}
|
|
|
|
private function setInleiding(){
|
|
|
|
$this->inleiding = [
|
|
"bevoegdgezag" => $this->bg,
|
|
"schoolnaam" => $this->schoolnaam,
|
|
"details" => $this->details
|
|
];
|
|
|
|
}
|
|
|
|
} |