-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring extractAttributes method + Adding Interface
- Loading branch information
1 parent
f010f45
commit fc3ec07
Showing
2 changed files
with
89 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php namespace Arcanedev\Localization\Contracts; | ||
|
||
/** | ||
* Interface UrlInterface | ||
* | ||
* @package Arcanedev\Localization\Contracts | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
interface UrlInterface | ||
{ | ||
/* ------------------------------------------------------------------------------------------------ | ||
| Main Functions | ||
| ------------------------------------------------------------------------------------------------ | ||
*/ | ||
/** | ||
* Extract attributes for current url. | ||
* | ||
* @param bool|false|string $url | ||
* | ||
* @return array | ||
*/ | ||
public static function extractAttributes($url = false); | ||
|
||
/** | ||
* Change uri attributes (wildcards) for the ones in the $attributes array. | ||
* | ||
* @param array $attributes | ||
* @param string $uri | ||
* | ||
* @return string | ||
*/ | ||
public static function substituteAttributes(array $attributes, $uri); | ||
|
||
/** | ||
* Build URL using array data from parse_url. | ||
* | ||
* @param array|false $parsed | ||
* | ||
* @return string | ||
*/ | ||
public static function unparse($parsed); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters