<?php


class layouts{

private $CI;

private $includes= array();

public function __construct() 
{ 

	$this->CI =& get_instance();

}


public function add_includes($path, $prepend_base_url = true)

{


if($prepend_base_url)

{
$this->CI->load->helper('url');
$this->includes[]=base_url(). $path;
}
else
{

$this->includes[]= $path;

}

return $this;


}

public function print_includes()


{

$final_includes='';

foreach ($this->includes as $include){

if(preg_match('/js$/', $include)){

$final_includes .= '<script src ="' . $include ."?v=2021.4.7". '"></script>';

}


}

return $final_includes;

}



}



?>
