PHP Class Laravelista\Ekko\Ekko

Show file Open project: laravelista/ekko Class Usage Examples

Protected Properties

Property Type Description
$route
$url

Public Methods

Method Description
__construct ( Router $route, UrlGenerator $url )
areActiveRoutes ( array $routeNames, string $output = "active" ) : boolean Compares given array of route names with current route name.
areActiveURLs ( array $urls, string $output = "active" ) : boolean Compares given array of URLs with current URL.
isActiveMatch ( string $string, string $output = "active" ) : boolean Detects if the given string is found in the current URL.
isActiveRoute ( string $routeName, string $output = "active" ) : boolean Compares given route name with current route name.
isActiveURL ( string $url, string $output = "active" ) : boolean Compares given URL with current URL.

Method Details

__construct() public method

public __construct ( Router $route, UrlGenerator $url )
$route Illuminate\Routing\Router
$url Illuminate\Routing\UrlGenerator

areActiveRoutes() public method

Compares given array of route names with current route name.
public areActiveRoutes ( array $routeNames, string $output = "active" ) : boolean
$routeNames array
$output string
return boolean

areActiveURLs() public method

Compares given array of URLs with current URL.
public areActiveURLs ( array $urls, string $output = "active" ) : boolean
$urls array
$output string
return boolean

isActiveMatch() public method

Detects if the given string is found in the current URL.
public isActiveMatch ( string $string, string $output = "active" ) : boolean
$string string
$output string
return boolean

isActiveRoute() public method

Any section of the route name can be replaced with a * wildcard. Example: user.*
public isActiveRoute ( string $routeName, string $output = "active" ) : boolean
$routeName string
$output string
return boolean

isActiveURL() public method

Compares given URL with current URL.
public isActiveURL ( string $url, string $output = "active" ) : boolean
$url string
$output string
return boolean

Property Details

$route protected property

protected $route

$url protected property

protected $url