function set_template_name($path) { $file = basename($path); $pos = strpos($file, '.'); return $this->name = substr($file, 0, $pos); }