Class Socialveo\Core\Url

InheritanceSocialveo\Core\Url » Phalcon\Mvc\Url

Class Url

Public Methods

Hide inherited methods

MethodDescriptionDefined By
get() Generates a URL Socialveo\Core\Url
setCustomRouteHandle() Socialveo\Core\Url
setCustomRoutePath() Set custom route path for router. Socialveo\Core\Url
setRewrite() Set rewrite for url $url->setRewrite(['for' => 'staticPagesView', 'page' => 'news'], ['for' => 'staticNews']); Socialveo\Core\Url

Property Details

$_customHandles protected static property
protected static array $_customHandles = []
$_customPaths protected static property
protected static array $_customPaths = []

Method Details

get() public method

Generates a URL

public string get ( $uri null, $args null, $local null, $baseUri null )
$uri mixed
$args mixed
$local mixed
$baseUri mixed
throws Exception
getUriFromItem() protected method

protected array getUriFromItem ( $uri, $routes, $obj )
$uri array
$routes array
$obj Socialveo\Core\models\SocialveoModel
modifyUri() protected method

protected array modifyUri ( $route, $uri, $obj null )
$route string
$uri array
$obj array|Socialveo\Core\models\SocialveoModel
setCustomRouteHandle() public method

public void setCustomRouteHandle ( $route, $callback )
$route string
$callback callable
setCustomRoutePath() public method

Set custom route path for router.

Example: $url->setCustomRoutePath('network', 'uuid', function($uuid) {

   $network = \Socialveo\Core\models\SocialveoModel::getModel('network');
   return $network::findFirstByUuid($uuid);

});

public void setCustomRoutePath ( $route, $path, $callback )
$route string
$path string
$callback callable
setRewrite() public method

Set rewrite for url $url->setRewrite(['for' => 'staticPagesView', 'page' => 'news'], ['for' => 'staticNews']);

public void setRewrite ( $from, $to )
$from array
$to array