I build css links with a function but if I don't do a var_dump on the end, the css will not work. What am I missing or not seeing?
The code:
private function buildCssLinks(){
$files = $this->findFiles(dirname(dirname(__FILE__))."/css","css");
foreach ($files as $id)
{
$pathInfo = pathinfo($id);
$fileName = $pathInfo['basename'];
$files[] = '<link rel="stylesheet" type="text/css" href="css/' . $fileName . '">';
}
return implode("",$files);
}
returns
but when I add a var dump in my code
private function buildCssLinks(){
$files = $this->findFiles(dirname(dirname(__FILE__))."/css","css");
foreach ($files as $id)
{
$pathInfo = pathinfo($id);
$fileName = $pathInfo['basename'];
$files[] = '<link rel="stylesheet" type="text/css" href="css/' . $fileName . '">';
}
var_dump($files);
return implode("",$files);
}
the 2nd return
the code that calls the functions __construct
public function __construct($header, $body, $footer)
{
$this->header = $header;
$this->body = $body;
$this->footer = $footer;
$this->buildHeader();
$this->buildBody();
$this->buildFooter();
$js = $this->buildJsLinks();
$css = $this->buildCssLinks();
$this->header = $css;
$this->footer = $js;
}