Código PHP:
<?php
interface IArchive
{
public function archiveItems($key);
}
?>
Código PHP:
<?php
interface IPaginate
{
public function totalItems();
public function paginateItems($i,$j,$key);
}
?>
Código PHP:
<?php
require_once("CLDB.php");
require_once("IPaginate.php");
require_once("IArchive.php");
class DArticles implements IArchive,IPaginate
{
private static $numberRows;
private static $idItem;
public static $dbQuery;
public function __construct()
{
self::$dbQuery = DB::connectionDB();
}
/***************implementando interface paginate******************/
public function totalItems()
{
self::$dbQuery->setSql("SELECT * FROM aep_articles ORDER BY datetime_public_articles DESC");
return self::$dbQuery->getNumRows();
}
public function paginateItems($pagerow,$forpage,$key=0)
{
self::$dbQuery->setSql("SELECT * FROM aep_articles ORDER BY datetime_public_articles DESC");
self::$dbQuery->setSqlLimit($pagerow,$forpage);
return ($key===0)?self::$dbQuery->getFetchRowArray():self::$dbQuery->getFetchRowAssoc();
}
/****************************implementando interface Archive*******************/
public function archiveItems($key=0)
{
self::$dbQuery->setSql("SELECT datetime_public_articles FROM aep_articles ORDER BY datetime_public_articles DESC");
return ($key===0)?self::$dbQuery->getFetchRowAssoc():self::$dbQuery->getFetchRowArray();
}
//otros metodos propios de lcase
?>
Fatal error: Declaration of DArticles::archiveItems() must be compatible with that of IArchive::archiveItems() in /www/hosting/home/site/CLData/CLDArticles.php on line 5
pero he analizado bien, ya que la otra interfaz tb es similar y no me da ningún error.