Fatal error: Class 'Products\Summary\Html\Section' not found
I get the above error on the following code. I've verified that Summary\Html\Section() is indeed the namespace of the class I'm trying to access. I'm not entirely sure why this isn't working... any thoughts?
<?php
namespace Products;
use Products\Base as ProductBase;
use Products\Mapping as MappingInterface;
use Summary\Html;
class Product1 extends ProductBase implements MappingInterface {
/**
* Complete PDF mapping
*
* @return Array
*/
public function render() {
$preTable = new Summary\Html\Section();
$row = $preTable->addRow();
$row->addColumn()->setValue('Headline one')->addClass('first');
$row->addColumn()->setValue('Headline two')->addClass('first');
return $preTable;
}
My section class:
namespace Summary\Html;
use Summary\Html\Element;
use Summary\Html\Section\Row;
class Section extends Element {
Looks like it thinks Summary\Html is part of the Products namespace. Try this:
$preTable = new \Summary\Html\Section();