This file contains hidden or 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
| /** | |
| * @param string $templateFileName | |
| * @param bool $ob | |
| * @param array $context | |
| * @see Stream | |
| * @see ob_start | |
| * @return string | |
| * @throws Exception | |
| */ | |
| public static function viewFileAsString(string $templateFileName, bool $ob = false, array $context = []): string |
This file contains hidden or 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
| <?php | |
| use App\lib\Helpers; | |
| use DI\Container; | |
| use Slim\Factory\AppFactory; | |
| require(dirname(__FILE__) . '/vendor/autoload.php'); | |
| Helpers::setEnvByFile('.env'); | |
| AppFactory::setContainer(new Container); |
This file contains hidden or 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
| /** | |
| * Arrow function as route callable | |
| */ | |
| $app->get('/functions', fn(Request $request, Response $response, array $args) => $response | |
| ->withBody((new StreamFactory) | |
| ->createStream( | |
| Bcrypt::hashPassword('1596321758') | |
| ) | |
| ) |