I'm new to programming but I am using fat-free to learn and I love it but I am trying to change my app over to use cortex
but I keep getting this error, and I just can't seem to fix it
Fatal error: Declaration of DB\Cortex::count($filter = NULL, $ttl = 60) must be compatible with DB\Cursor::count($filter = NULL, array $options = NULL, $ttl = 0) in C:\WebServer\vhosts\site1\vendor\ikkez\f3-cortex\lib\db\cortex.php on line 29
fat-free = 3.6.1
this is my database set up
function __construct() {
$f3 = \Base::instance();
$this->f3=$f3;
$db= new \DB\SQL(
$f3->get('dev'),
$f3->get('dbuser'),
$f3->get('dbpass'),
array( \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION )
);
$this->f3->set('DB', $db );
$this->db=$db;
}
this is my model
<?php
namespace Model;
class Articles extends \DB\Cortex {
protected
$db = 'DB', // F3 hive key of a valid DB object
$table = 'db_articles'; // the DB table to work on
}
and I am calling this in my controller
$articles = new \Model\Articles();
$articles->load(array('approved = ?',1));
what am I doing wrong ?