phalcon-debugbar
phalcon-debugbar copied to clipboard
Call to undefined method App\Middleware\Url::getStatic()
i have problem with this library
see my ss
code of Url
<?php
namespace App\Middleware;
/*
|--------------------------------------------------------------------------
| Database Provider
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
*/
use \Phalcon\Mvc\Url as PhalconUrl;
use \Phalcon\Mvc\User\Component;
class Url extends Component
{
/**
* Url Instance
*
*/
protected static $url;
/**
* Define base url
*
*/
function __construct()
{
$config = $this->di['config']->app;
$url = new PhalconUrl;
$url->setBaseUri($config->base_url);
self::$url = $url;
}
/**
* Base Url
*
*/
public static function get($path = '', $args = null, $local = true)
{
return self::$url->get($path, $args, $local);
}
/**
* Asset Url
*
*/
public static function asset($path = '', $args = null, $local = true)
{
return self::$url->get('public/' . $path, $args, $local);
}
}
thanks
user-defined url
service must extend from the \Phalcon\Mvc\Url class.