dcCore dcCore object
@param rs recordSet Items recordSet to display
@param rs_count int Total items number
*/
public function __construct($core,$rs,$rs_count)
{
// For backward compatibility only: the developer tried to create
// a list with the old constructor.
ob_start($this->raiseDeprecated(get_class($this)));
$this->core =& $core;
$this->rs =& $rs;
$this->rs_count = $rs_count;
$this->html_prev = __('«prev.');
$this->html_next = __('next»');
}
/**
Raises a E_USER_NOTICE error for deprecated classes.
This allows the developer to know he's been using deprecated classes.
@param name string Name of the deprecated classes that was called.
*/
private function raiseDeprecated($name)
{
if (DC_DEBUG) {
$trace = debug_backtrace();
array_shift($trace);
$grand = array_shift($trace);
$msg = 'Deprecated class called. (';
$msg .= $name.' was called from '.$grand['file'].' ['.$grand['line'].'])';
trigger_error($msg, E_USER_NOTICE);
}
}
}
?>