-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
public folder as folder for apache twig usage begin
- Loading branch information
Showing
69 changed files
with
680 additions
and
60 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
APP_ENV=dev | ||
APP_DEBUG=1 | ||
APP_DEBUG=1 | ||
APP_SECRET=e77989ed21758e78331b20e477fc5582 | ||
APP_NAME=OpenSourceBikeShare |
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
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?php | ||
|
||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle; | ||
use Symfony\Bundle\MonologBundle\MonologBundle; | ||
declare(strict_types=1); | ||
|
||
return [ | ||
FrameworkBundle::class => ['all' => true], | ||
MonologBundle::class => ['all' => true], | ||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], | ||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], | ||
\Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], | ||
]; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
use Symfony\Config\TwigConfig; | ||
|
||
return static function (TwigConfig $twig) { | ||
$twig->global('siteName')->value('%env(APP_NAME)%'); | ||
}; |
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,20 @@ | ||
<?php | ||
|
||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; | ||
|
||
return function (RoutingConfigurator $routes) { | ||
$routes->add('home', '/') | ||
->controller([\BikeShare\Controller\HomeController::class, 'index']); | ||
$routes->add('command', '/command.php') | ||
->controller([\BikeShare\Controller\CommandController::class, 'index']); | ||
$routes->add('scan', '/scan.php/{action}/{id}') | ||
->controller([\BikeShare\Controller\ScanController::class, 'index']); | ||
$routes->add('admin', '/admin.php') | ||
->controller([\BikeShare\Controller\AdminController::class, 'index']); | ||
$routes->add('register', '/register.php') | ||
->controller([\BikeShare\Controller\RegisterController::class, 'index']); | ||
$routes->add('sms_request', '/receive.php') | ||
->controller([\BikeShare\Controller\SmsRequestController::class, 'index']); | ||
$routes->add('agree', '/agree.php') | ||
->controller([\BikeShare\Controller\AgreeController::class, 'index']); | ||
}; |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
die('Deprectaed see HomeController'); | ||
|
||
require_once 'vendor/autoload.php'; | ||
require_once "actions-web.php"; | ||
|
||
|
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
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
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,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace BikeShare\Command; | ||
|
||
use BikeShare\App\Kernel; | ||
use Symfony\Component\Console\Attribute\AsCommand; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
#[AsCommand(name: 'app:long_rental_check', description: 'Check user which have long rental')] | ||
class LongRentalCheckCommand extends Command | ||
{ | ||
protected static $defaultName = 'app:long_rental_check'; | ||
|
||
private Kernel $kernel; | ||
|
||
public function __construct(Kernel $kernel) | ||
{ | ||
$this->kernel = $kernel; | ||
parent::__construct(); | ||
} | ||
|
||
protected function execute(InputInterface $input, OutputInterface $output): int | ||
{ | ||
$kernel = $this->kernel; | ||
|
||
require_once $this->kernel->getContainer()->getParameter('kernel.project_dir') . '/actions-web.php'; | ||
|
||
checklongrental(); | ||
|
||
return Command::SUCCESS; | ||
} | ||
} |
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,33 @@ | ||
<?php | ||
|
||
namespace BikeShare\Controller; | ||
|
||
use BikeShare\App\Kernel; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\HttpFoundation\Request; | ||
|
||
class AdminController extends AbstractController | ||
{ | ||
private Kernel $kernel; | ||
|
||
public function __construct(Kernel $kernel) | ||
{ | ||
$this->kernel = $kernel; | ||
} | ||
|
||
/** | ||
* @Route("/admin.php", name="admin") | ||
*/ | ||
public function index( | ||
Request $request | ||
): Response { | ||
$kernel = $this->kernel; | ||
|
||
ob_start(); | ||
require_once $this->getParameter('kernel.project_dir') . '/admin.php'; | ||
$content = ob_get_clean(); | ||
|
||
return new Response($content); | ||
} | ||
} |
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,36 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace BikeShare\Controller; | ||
|
||
use BikeShare\App\Kernel; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\Routing\Annotation\Route; | ||
|
||
class AgreeController extends AbstractController | ||
{ | ||
private Kernel $kernel; | ||
|
||
public function __construct(Kernel $kernel) | ||
{ | ||
$this->kernel = $kernel; | ||
} | ||
|
||
/** | ||
* @Route("/agree.php", name="agree") | ||
*/ | ||
public function index( | ||
Request $request | ||
): Response { | ||
$kernel = $this->kernel; | ||
|
||
ob_start(); | ||
require_once $this->getParameter('kernel.project_dir') . '/agree.php'; | ||
$content = ob_get_clean(); | ||
|
||
return new Response($content); | ||
} | ||
} |
Oops, something went wrong.