Cannot access protected property Slim\Slim::$mode in

PHP
	$app->configureMode($app->config('mode'), function() use ($app) {
		$app->config = config::load(INC_ROOT . "/app/config/{$app->mode}.php")
Source

Also in PHP: