-
Notifications
You must be signed in to change notification settings - Fork 0
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
0861612
commit 3071fb3
Showing
8 changed files
with
679 additions
and
1 deletion.
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
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,59 @@ | ||
<?php declare(strict_types=1); | ||
/** | ||
* Api | ||
* | ||
* Workflow of your api | ||
* | ||
* PHP version 8.1.2 | ||
* | ||
* @package kzarshenas/crazyphp | ||
* @author kekefreedog <kevin[email protected]> | ||
* @copyright 2022-2023 Kévin Zarshenas | ||
*/ | ||
namespace {{Namespace}}; | ||
|
||
/** | ||
* Dependances | ||
*/ | ||
use CrazyPHP\Interface\CrazyRouterType; | ||
use CrazyPHP\Core\Router; | ||
|
||
/** | ||
* {{Class}} | ||
* | ||
* Class for manage {{Name}} router type | ||
* | ||
* @package kzarshenas/crazyphp | ||
* @author kekefreedog <kevin[email protected]> | ||
* @copyright 2022-2023 Kévin Zarshenas | ||
*/ | ||
class {{Class}} implements CrazyRouterType { | ||
|
||
/** | ||
* Search Reg Exp | ||
* | ||
* Method returns regexp for searching this entity in the URL | ||
* | ||
* @return string regexp for searching | ||
*/ | ||
public static function searchRegExp():string { | ||
|
||
# Return | ||
return '(\[{{Name}}:'.Router::PARAMETER_NAME_REGEX.'\])'; | ||
} | ||
|
||
/** | ||
* Parser Reg Exp | ||
* | ||
* Method returns regexp to parse the language code if it occurs | ||
* | ||
* @return string regexp for parsing | ||
*/ | ||
public static function parserRegExp():string { | ||
|
||
# Regular expression for ISO 639-1 standard language codes | ||
return '{{Regex}}'; | ||
|
||
} | ||
|
||
} |
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 |
---|---|---|
|
@@ -62,6 +62,7 @@ Router: | |
parameters: | ||
api: | ||
format: json | ||
type : {} | ||
methods: | ||
- get | ||
- post | ||
|
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
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
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
Oops, something went wrong.