anandpilania / php-reloadr
Live reload
Installs: 22
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/anandpilania/php-reloadr
Requires
- php: >=5.3
This package is auto-updated.
Last update: 2025-10-13 06:15:44 UTC
README
# PHP-Reloadr - Live reload PHP app while developing.
## Using
$reloadr = new Reloadr(array(
'root_path' => __DIR__,
'route' => 'domain.tld/reloadr',
'dirs' => array(
'public',
'views',
'config'
),
'files' => array(
'lang/en.php'
),
'filter' => array(
'accept' => array(
'css',
'js',
'html',
'php'
)
)
));
echo/return $reloader->init(); // returns js script. `echo` it into template OR from your `controller` [with `javascript` header]
echo/return $reloadr->ajax(); // call it into the `route` controller
### Config
'jq' => false, // set TRUE if jQuery is not added
'freq' => 5000, // freq of AJAX call
'root_path' => null, // root path/realpath
'route' => '/reloadr', // route for ajax call
'dirs' => array(), // recuresively check all files for reload
'files' => array(), // files
'filter' => array(
'except' => null, // all files, except these array()
'accept' => 'php','htm','css','js' // accept only
),
'set_header' => true // set `application/javascript` and `application/json` header to ajax route