Hello,
My services.php looks like this:
/**
-
Setting up the view component */ $di->set('view', function(){ $view = new \Phalcon\Mvc\View(); $view->setViewsDir($config->application->viewsDir); return $view; });
but when I run an application, i keep getting the notice : Trying to get property of non-object in /app/config/services.php on line 44
Line 44 is: $view->setViewsDir($config->application->viewsDir)
So apparently $config is not set-up as an object.
Higher up, I do have /**
- Register the global configuration as config */ $di->set('config', $config);
and it is working flawlessly with other DI members, such as the database.
Am I overlooking something or is this standard behaviour?
Thanks! Alex