| 1 |
<?php |
| 2 |
|
| 3 |
namespace ipl\Orm\Contract; |
| 4 |
|
| 5 |
use ipl\Orm\Behavior; |
| 6 |
|
| 7 |
interface RewritePathBehavior extends Behavior |
| 8 |
{ |
| 9 |
/** |
| 10 |
* Rewrite the given relation path |
| 11 |
* |
| 12 |
* The result must be returned otherwise (NULL is returned) the original path is kept as is. |
| 13 |
* |
| 14 |
* @param string $path |
| 15 |
* @param ?string $relation The absolute path of the model. For reference only, don't include it in the result |
| 16 |
* |
| 17 |
* @return ?string |
| 18 |
*/ |
| 19 |
public function rewritePath(string $path, ?string $relation = null): ?string; |
| 20 |
} |