I sees many pages in the Phalcon's document said implement but none of them show how to implement.
For example: URL class.
I was extended my URL generator class in app/Extend/Phalcon/Mvc/Url.php
<?php
namespace Extend\Phalcon\Mvc;
class Url extends \Phalcon\Mvc\Url
{
/**
* Returns the prefix for all the generated urls. By default /
*
* @return string
*/
public function getBaseUri()
{
return 'hey';
}
}
Now, i want to use it properly in my controller like this. echo $this->url->getBaseUri();
.
But it didn't work.
So, i replaced namespace\class in app/config/services.php from use Phalcon\Mvc\Url as UrlResolver;
to use Extension\Phalcon\Mvc\Url as UrlResolver;
But i'm getting this error Fatal error: Class 'Extension\Phalcon\Mvc\Url' not found