Welcome Guest, Not a member yet? Register   Sign In
No Model errors reported when calling Global Controller Method
#1

(This post was last modified: 02-15-2019, 10:42 PM by John_Betong.)

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 
  declare
(strict_types=1);

 
 namespace App\Models;

 
 error_reporting(-1);
 
 ini_set('display_error$''true');

 
 use CodeIgniter\Model;
 
 // use App\Libraries\L_Super;

 
 // var_dump( get_class_methods('CodeIgniter\Model\M_ci4'));

//=======================================
class M_ci4 extends Model
{

protected 
$db;

//=============================
public dbWriteCsv(
 
 string  $fCsv
 
 int     $iDevId=0
 
 string  $sensorName='NO NAME???'
)
:
int
{
// 
//
// 
 
 $tmp $this->_addHour2UKTime((string) $row->tstamp$lBKK=false);
var_dump($tmp); // returns NULL
die; 
 The addHour2UKTime method is in the Global Controller and not only is it not called but there is no errors or warning shown and var_dump($tmp); returns NULL  !!!!!

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?
Reply


Messages In This Thread
No Model errors reported when calling Global Controller Method - by John_Betong - 02-15-2019, 10:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB