src/Potter/PotterCore.php
public function  loadFile($file)
    {
        $file = cleanURI($file);
        if (!file_exists($file)) return false;;
        // Include
        require_once($file);

        $name = basename($file, '.php');

        // File class
        if (class_exists($name)):
            $class = new $name;
            //Model Class
            if (is_subclass_of($name, 'Potter\Post\Type')):
                $this->registerModel($class);
            endif;

            return $class;
        endif;

        return true;
    }
public function  loadFile($file)
    {
        $file = cleanURI($file);
        if (!file_exists($file)) return false;;
        // Include
        require_once($file);

        $name = basename($file, '.php');

        // File class
        if (class_exists($name)):
            $class = new $name;
            //Model Class
            if (is_subclass_of($name, 'Potter\Post\Type')):
                $this->registerModel($class);
            endif;

            return $class;
        endif;

        return true;
    }
@param $file

@return mixed