-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6400d6
commit 0eeea18
Showing
1 changed file
with
25 additions
and
0 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,25 @@ | ||
<?php | ||
|
||
namespace TgUtils; | ||
|
||
/** Helpers to construct URLs from objects */ | ||
interface LinkBuilder { | ||
|
||
public const LIST = 'list'; | ||
public const VIEW = 'view'; | ||
public const CREATE = 'create'; | ||
public const EDIT = 'edit'; | ||
public const DELETE = 'delete'; | ||
public const COPY = 'copy'; | ||
|
||
/** | ||
* Constructs and returns the link. | ||
* @param mixed $subject - the subject of the link (an object or method or string or anything) | ||
* @param string $action - the action that the link will fulfill with the subject | ||
* @param array $params - parameters, either for the link construction process or the GET parameters in the link | ||
* @return string - the link constructed, targeting the subject with the action and optional parameters. | ||
*/ | ||
public function getLink($subject, $action = self::VIEW, $params = NULL); | ||
|
||
} | ||
|