routes and file names

59 views
Skip to first unread message

Peter Hecht

unread,
Apr 13, 2018, 5:19:52 PM4/13/18
to Fat-Free Framework
Hello,

This is probably a PHP question over F3, but.....

I have a config/routes.ini which has a line:
GET /date=DateController->index

In the config.ini
AUTOLOAD=app/controllers/|app/models/

In my app/controllers folder I have a file called DateController.php (and a Controller.php) with the class definition of:


<?php

class DateController extends Controller {

In this configuration, every thing works fine.  

If I want to change the names of the files to please php-codesniffer PSR2 standard to class-*.php, it all goes 404.

I have tried changing a lot of changes, but none work.  So I will ignore the errors till I either I get an answer here or something.  

Thanks for listening. 


ikkez

unread,
Apr 14, 2018, 9:07:38 PM4/14/18
to Fat-Free Framework
You can set AUTOLOAD to an array, having the 2nd item a callable which will be used to extend the naming scheme for scanning file names, like app/controllers/|app/models,Custom::autoload
Reply all
Reply to author
Forward
0 new messages