1
0
mirror of https://github.com/restoreddev/phpapprentice.git synced 2025-10-24 03:16:07 +02:00

Initial commit for public repo

This commit is contained in:
Andrew Davis
2018-09-02 10:57:36 -05:00
commit cb5d7c2386
79 changed files with 14644 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace Apprentice\Command;
use Apprentice\Build;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class BuildCommand extends Command
{
protected function configure()
{
$this->setName('build')
->setDescription('Builds PHP templates into HTML files.')
->setHelp('Help!');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$build = new Build;
$build->buildAll();
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Apprentice\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ServerCommand extends Command
{
protected function configure()
{
$this->setName('server')
->setDescription('Runs PHP server that automatically builds files')
->setHelp('Help!');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln('Starting development server on localhost:8080');
system('php -S localhost:8080 -t docs src/util/router.php');
}
}