No Model errors reported when calling Global Controller Method |
I am in the process of updating a standalone MySqli/Pdo database that creates SVG Charts (courtesy of HighCharts) and was most surprised when the imported script did not show the Chart (which are shown in the Standalone Version).
The Model: PHP Code: <?php I tried adding the following NameSpace to the Model and it is still not called and once again with no errors or warnings shown? use App\Libraries\L_Super; I was able to call the method by adding to the Model: private function addHour2UKTime(...) . Is this a NameSpace problem or am I expecting too much from the Models?
I had a thought and will try the following when I am back on the desktop:
$tmp = $l_super-> _ addHour2UKTime((string) $row->tstamp, $lBKK=false); I will try with and without the leading underscore.
I managed to crack it
Added this to the Model: use App\Libraries\L_super; //=============================================== public function __construct(...$params) { $this->l_super = new \App\Libraries\L_super(); }// //============================================================ public function dbWriteCsv( string $fCsv, int $iDevId=0, string $sensorName='NO NAME???' ) :int { // ... // ... $tmp = $this->l_super->addHour2UKTime((string) $row->tstamp, $lBKK=false); var_dump($tmp); // /var/www/this-is-a-test.com/app/Models/M_ci4.php:102:int 1548567540 |
Welcome Guest, Not a member yet? Register Sign In |