├── .gitignore ├── .htaccess ├── Controllers ├── Api │ └── HomeController.php └── Web │ ├── AccountController.php │ └── HomeController.php ├── Core ├── ApiController.php ├── App.php ├── Config.php ├── Controller.php ├── DBMongo.php ├── DBPdo.php ├── DBSql.php ├── ExceptionHandler.php ├── Route.php ├── Router.php ├── Session.php ├── View.php ├── WebController.php └── init.php ├── LICENSE ├── Models ├── .disabled.mongo.userrepository.class.php ├── .disabled.mysqli.userrepository.class.php ├── User.php └── codes.php ├── README.md ├── Repositories ├── LoginService.php ├── RegisterService.php └── UserRepository.php ├── Views ├── Web │ ├── Account │ │ ├── Index.html │ │ ├── Login.html │ │ ├── Register.html │ │ └── View.html │ └── Home │ │ ├── About.html │ │ └── Index.html ├── _FullMessages │ ├── StatusCodeMessage │ │ ├── 403.html │ │ ├── 404.html │ │ └── 500.html │ ├── error.html │ └── message.html └── _Layouts │ └── default │ ├── alerts │ ├── errors.html │ ├── infos.html │ ├── successes.html │ └── warnings.html │ ├── footer.html │ ├── header.html │ ├── layout.html │ └── meta.html ├── Webroot ├── .htaccess ├── bootstrap │ ├── css │ │ ├── bootstrap-flatly.css │ │ ├── bootstrap-flatly.min.css │ │ ├── bootstrap.css │ │ ├── bootstrap.min.css │ │ ├── fontawesome-all.css │ │ └── fontawesome-all.min.css │ ├── js │ │ ├── bootstrap.min.js │ │ ├── jquery-3.2.1.slim.min.js │ │ └── popper.min.js │ └── webfonts │ │ ├── fa-brands-400.eot │ │ ├── fa-brands-400.svg │ │ ├── fa-brands-400.ttf │ │ ├── fa-brands-400.woff │ │ ├── fa-brands-400.woff2 │ │ ├── fa-regular-400.eot │ │ ├── fa-regular-400.svg │ │ ├── fa-regular-400.ttf │ │ ├── fa-regular-400.woff │ │ ├── fa-regular-400.woff2 │ │ ├── fa-solid-900.eot │ │ ├── fa-solid-900.svg │ │ ├── fa-solid-900.ttf │ │ ├── fa-solid-900.woff │ │ └── fa-solid-900.woff2 ├── css │ ├── common.css │ ├── error.css │ └── home.css ├── favicon.ico ├── index.php ├── js │ └── .gitkeep └── uploads │ └── .gitkeep ├── _config.yml ├── composer.json ├── config ├── DbConfig │ ├── mongo.php │ ├── mysql.php │ ├── mysqli.php │ └── pdo.php ├── config.php └── routes.php ├── database └── sql_database_script.sql ├── modules └── Default │ ├── Api │ └── routes.php │ └── web │ └── routes.php ├── package-lock.json ├── start └── vendor ├── autoload.php ├── commands ├── GetRoutes.php ├── GreetCommand.php └── MakeModel.php ├── composer ├── ClassLoader.php ├── LICENSE ├── autoload_classmap.php ├── autoload_namespaces.php ├── autoload_psr4.php ├── autoload_real.php ├── autoload_static.php └── installed.json └── symfony └── console └── Symfony └── Component └── Console ├── .gitignore ├── Application.php ├── CHANGELOG.md ├── Command ├── Command.php ├── HelpCommand.php └── ListCommand.php ├── ConsoleEvents.php ├── Descriptor ├── ApplicationDescription.php ├── Descriptor.php ├── DescriptorInterface.php ├── JsonDescriptor.php ├── MarkdownDescriptor.php ├── TextDescriptor.php └── XmlDescriptor.php ├── Event ├── ConsoleCommandEvent.php ├── ConsoleEvent.php ├── ConsoleExceptionEvent.php └── ConsoleTerminateEvent.php ├── Formatter ├── OutputFormatter.php ├── OutputFormatterInterface.php ├── OutputFormatterStyle.php ├── OutputFormatterStyleInterface.php └── OutputFormatterStyleStack.php ├── Helper ├── DebugFormatterHelper.php ├── DescriptorHelper.php ├── DialogHelper.php ├── FormatterHelper.php ├── Helper.php ├── HelperInterface.php ├── HelperSet.php ├── InputAwareHelper.php ├── ProcessHelper.php ├── ProgressBar.php ├── ProgressHelper.php ├── QuestionHelper.php ├── Table.php ├── TableHelper.php ├── TableSeparator.php └── TableStyle.php ├── Input ├── ArgvInput.php ├── ArrayInput.php ├── Input.php ├── InputArgument.php ├── InputAwareInterface.php ├── InputDefinition.php ├── InputInterface.php ├── InputOption.php └── StringInput.php ├── LICENSE ├── Logger └── ConsoleLogger.php ├── Output ├── BufferedOutput.php ├── ConsoleOutput.php ├── ConsoleOutputInterface.php ├── NullOutput.php ├── Output.php ├── OutputInterface.php └── StreamOutput.php ├── Question ├── ChoiceQuestion.php ├── ConfirmationQuestion.php └── Question.php ├── README.md ├── Resources └── bin │ └── hiddeninput.exe ├── Shell.php ├── Tester ├── ApplicationTester.php └── CommandTester.php ├── Tests ├── ApplicationTest.php ├── Command │ ├── CommandTest.php │ ├── HelpCommandTest.php │ └── ListCommandTest.php ├── Descriptor │ ├── AbstractDescriptorTest.php │ ├── JsonDescriptorTest.php │ ├── MarkdownDescriptorTest.php │ ├── ObjectsProvider.php │ ├── TextDescriptorTest.php │ └── XmlDescriptorTest.php ├── Fixtures │ ├── BarBucCommand.php │ ├── DescriptorApplication1.php │ ├── DescriptorApplication2.php │ ├── DescriptorCommand1.php │ ├── DescriptorCommand2.php │ ├── DummyOutput.php │ ├── Foo1Command.php │ ├── Foo2Command.php │ ├── Foo3Command.php │ ├── Foo4Command.php │ ├── Foo5Command.php │ ├── FooCommand.php │ ├── FooSubnamespaced1Command.php │ ├── FooSubnamespaced2Command.php │ ├── FoobarCommand.php │ ├── TestCommand.php │ ├── application_1.json │ ├── application_1.md │ ├── application_1.txt │ ├── application_1.xml │ ├── application_2.json │ ├── application_2.md │ ├── application_2.txt │ ├── application_2.xml │ ├── application_astext1.txt │ ├── application_astext2.txt │ ├── application_asxml1.txt │ ├── application_asxml2.txt │ ├── application_gethelp.txt │ ├── application_renderexception1.txt │ ├── application_renderexception2.txt │ ├── application_renderexception3.txt │ ├── application_renderexception3decorated.txt │ ├── application_renderexception4.txt │ ├── application_renderexception_doublewidth1.txt │ ├── application_renderexception_doublewidth1decorated.txt │ ├── application_renderexception_doublewidth2.txt │ ├── application_run1.txt │ ├── application_run2.txt │ ├── application_run3.txt │ ├── application_run4.txt │ ├── command_1.json │ ├── command_1.md │ ├── command_1.txt │ ├── command_1.xml │ ├── command_2.json │ ├── command_2.md │ ├── command_2.txt │ ├── command_2.xml │ ├── command_astext.txt │ ├── command_asxml.txt │ ├── definition_astext.txt │ ├── definition_asxml.txt │ ├── input_argument_1.json │ ├── input_argument_1.md │ ├── input_argument_1.txt │ ├── input_argument_1.xml │ ├── input_argument_2.json │ ├── input_argument_2.md │ ├── input_argument_2.txt │ ├── input_argument_2.xml │ ├── input_argument_3.json │ ├── input_argument_3.md │ ├── input_argument_3.txt │ ├── input_argument_3.xml │ ├── input_definition_1.json │ ├── input_definition_1.md │ ├── input_definition_1.txt │ ├── input_definition_1.xml │ ├── input_definition_2.json │ ├── input_definition_2.md │ ├── input_definition_2.txt │ ├── input_definition_2.xml │ ├── input_definition_3.json │ ├── input_definition_3.md │ ├── input_definition_3.txt │ ├── input_definition_3.xml │ ├── input_definition_4.json │ ├── input_definition_4.md │ ├── input_definition_4.txt │ ├── input_definition_4.xml │ ├── input_option_1.json │ ├── input_option_1.md │ ├── input_option_1.txt │ ├── input_option_1.xml │ ├── input_option_2.json │ ├── input_option_2.md │ ├── input_option_2.txt │ ├── input_option_2.xml │ ├── input_option_3.json │ ├── input_option_3.md │ ├── input_option_3.txt │ ├── input_option_3.xml │ ├── input_option_4.json │ ├── input_option_4.md │ ├── input_option_4.txt │ └── input_option_4.xml ├── Formatter │ ├── OutputFormatterStyleStackTest.php │ ├── OutputFormatterStyleTest.php │ └── OutputFormatterTest.php ├── Helper │ ├── FormatterHelperTest.php │ ├── HelperSetTest.php │ ├── LegacyDialogHelperTest.php │ ├── LegacyProgressHelperTest.php │ ├── LegacyTableHelperTest.php │ ├── ProcessHelperTest.php │ ├── ProgressBarTest.php │ ├── QuestionHelperTest.php │ └── TableTest.php ├── Input │ ├── ArgvInputTest.php │ ├── ArrayInputTest.php │ ├── InputArgumentTest.php │ ├── InputDefinitionTest.php │ ├── InputOptionTest.php │ ├── InputTest.php │ └── StringInputTest.php ├── Logger │ └── ConsoleLoggerTest.php ├── Output │ ├── ConsoleOutputTest.php │ ├── NullOutputTest.php │ ├── OutputTest.php │ └── StreamOutputTest.php └── Tester │ ├── ApplicationTesterTest.php │ └── CommandTesterTest.php ├── composer.json └── phpunit.xml.dist /.gitignore: -------------------------------------------------------------------------------- 1 | composer.lock -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine on 3 | RewriteRule ^$ Webroot/ [L] 4 | RewriteRule (.*) Webroot/$1 [L] 5 | -------------------------------------------------------------------------------- /Controllers/Api/HomeController.php: -------------------------------------------------------------------------------- 1 | renderFullError('Not Found', 404); 21 | } 22 | 23 | public function Login() 24 | { 25 | if ($_SERVER['REQUEST_METHOD'] == 'POST') { 26 | //LOGIN 27 | if (LoginService::login($_POST['username'], $_POST['password'])) { 28 | //Redirect to returnUrl if exits, Else Redirect to Home 29 | if (!empty($_GET['returnUrl'])) 30 | $this->redirect($_GET['returnUrl']); 31 | 32 | //Redirect Home 33 | return $this->redirect('/'); 34 | } else //Login Failed, Render Form Again (Print alerts set by LoginService) 35 | return $this->render(); 36 | } else { 37 | //GET REQUEST -> RENDER FORM 38 | return $this->render(); 39 | } 40 | } 41 | 42 | public function Register() 43 | { 44 | if ($_SERVER['REQUEST_METHOD'] == 'POST') { 45 | if (RegisterService::Register($_POST['name'], $_POST['username'], $_POST['password'], $_POST['confirmPassword'], $_POST['email'])) 46 | return $this->redirect('/'); 47 | //Render Form back with error alerts 48 | else 49 | return $this->render(); 50 | } 51 | //ELSE GET = RENDER FORM 52 | return $this->render(); 53 | } 54 | 55 | public function Logout() 56 | { 57 | Session::destroyLoginSession(); 58 | if (!empty($_GET['returnUrl'])) 59 | return $this->redirect($_GET['returnUrl']); 60 | return $this->redirect('/'); 61 | } 62 | 63 | public function View($username) 64 | { 65 | 66 | $userRepository = new UserRepository(); 67 | 68 | $user = $userRepository->findByUsername($username); 69 | 70 | //Compare Information 71 | if ($user) { 72 | $this->data['username'] = &$user->username; 73 | $this->data['name'] = &$user->name; 74 | $this->data['email'] = &$user->email; 75 | $this->meta['title'] = &$user->name; 76 | return $this->render(); 77 | } else { 78 | return $this->renderFullError('Not Found', 404); 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Controllers/Web/HomeController.php: -------------------------------------------------------------------------------- 1 | render(); 13 | } 14 | 15 | public function About(){ 16 | //Set title of About page. 17 | $this->meta['title'] = 'About · Start'; 18 | return $this->render(); 19 | } 20 | } -------------------------------------------------------------------------------- /Core/ApiController.php: -------------------------------------------------------------------------------- 1 | ['code' => $errorStatusCode, 'message' => $message]]); 18 | } 19 | } -------------------------------------------------------------------------------- /Core/Config.php: -------------------------------------------------------------------------------- 1 | data = $data; 19 | $this->model = $model; 20 | $this->params = App::getRouter() -> getParams(); 21 | } 22 | 23 | /** Render Custom Full Error in API format. 24 | * @param $message 25 | * @param null $errorStatusCode 26 | * @return string 27 | */ 28 | function renderFullError($message, $errorStatusCode = null) 29 | { 30 | //Send response code via Header. 31 | if (is_numeric($errorStatusCode)) 32 | http_response_code($errorStatusCode); 33 | 34 | return 'Error Occurred: '.$message; 35 | } 36 | 37 | /** Redirect User to the given path. 38 | * @param $path 39 | * @return null 40 | */ 41 | function redirect($path) 42 | { 43 | header("Location: ".$path); 44 | return null; 45 | 46 | /* 47 | * Return null, only header with no test is sent, hence browsers will redirect following the location. 48 | (can be void, I returned null just to avoid some IDEs warnings when returning a void function, 49 | It doesn't impact result or performance whatsoever ) 50 | */ 51 | } 52 | 53 | /** 54 | * @return mixed 55 | */ 56 | public function getData() 57 | { 58 | return $this->data; 59 | } 60 | 61 | /** 62 | * @return mixed 63 | */ 64 | public function getModel() 65 | { 66 | return $this->model; 67 | } 68 | 69 | /** 70 | * @return mixed 71 | */ 72 | public function getParams() 73 | { 74 | return $this->params; 75 | } 76 | } -------------------------------------------------------------------------------- /Core/DBMongo.php: -------------------------------------------------------------------------------- 1 | $dbName; 49 | } 50 | 51 | /** 52 | * @param $collectionName 53 | * @param null $dbName 54 | * @return \MongoDB\Collection 55 | */ 56 | public static function getCollection($collectionName, $dbName = null) 57 | { 58 | //If Null passed, getDatabase returns the default DB from Config 59 | return self::getMongoDB($dbName) -> $collectionName; 60 | } 61 | 62 | /** 63 | * Return a new Mongo Object ID in string format. 64 | * @return string 65 | */ 66 | public static function getNewObjectId(){ 67 | return (string) (new \MongoDB\BSON\ObjectID()); 68 | } 69 | 70 | /* ensure true singleton */ 71 | public function __clone() 72 | { 73 | return false; 74 | } 75 | 76 | public function __wakeup() 77 | { 78 | return false; 79 | } 80 | 81 | //Config Functions 82 | public static function get($key){ 83 | return isset(self::$settings[$key]) ? self::$settings[$key] : null; 84 | } 85 | 86 | public static function set($key, $value){ 87 | self::$settings[$key] = $value; 88 | } 89 | 90 | } -------------------------------------------------------------------------------- /Core/ExceptionHandler.php: -------------------------------------------------------------------------------- 1 | path = $path; 23 | $this->data = $data; 24 | $this->meta = $meta; 25 | } 26 | 27 | public static function getDefaultViewPath() 28 | { 29 | $router = App::getRouter(); 30 | $controllerDir = $router -> getRoute().DS.$router -> getController(); 31 | $templateName = $router -> getAction().'.html'; 32 | return $controllerDir.DS.$templateName; 33 | } 34 | 35 | public function render(){ 36 | //This var to use $data['xxx'] / $meta['xxx'] in the view file without $this -> data. 37 | $data = &$this -> data; 38 | $meta = &$this -> meta; 39 | 40 | //START RENDERING 41 | ob_start(); 42 | 43 | //Render files 44 | include($this -> path); 45 | 46 | //Collect output 47 | $content = ob_get_clean(); 48 | 49 | //return 50 | return $content; 51 | } 52 | 53 | public static function renderAlerts($layoutAlertDir) 54 | { 55 | //START RENDERING 56 | ob_start(); 57 | 58 | $data = Session::getAlerts(); 59 | 60 | //Render Error Alerts 61 | if(!empty($data['errorAlerts'])) 62 | { 63 | //Render Errors 64 | include($layoutAlertDir.DS.'errors.html'); 65 | //Clean Errors 66 | unset($data['errorAlerts']); 67 | } 68 | 69 | //Render Warning Alerts 70 | if(!empty($data['warningAlerts'])) 71 | { 72 | //Render Errors 73 | include($layoutAlertDir.DS.'warnings.html'); 74 | //Clean Errors 75 | unset($data['warningAlerts']); 76 | } 77 | 78 | //Render Info Alerts 79 | if(!empty($data['infoAlerts'])) 80 | { 81 | //Render Errors 82 | include($layoutAlertDir.DS.'infos.html'); 83 | //Clean Errors 84 | unset($data['infoAlerts']); 85 | } 86 | 87 | //Render Success Alerts 88 | if(!empty($data['successAlerts'])) 89 | { 90 | //Render Errors 91 | include($layoutAlertDir.DS.'successes.html'); 92 | //Clean Errors 93 | unset($data['successAlerts']); 94 | } 95 | 96 | //Collect output 97 | $content = ob_get_clean(); 98 | 99 | //return 100 | return $content; 101 | } 102 | 103 | } -------------------------------------------------------------------------------- /Core/init.php: -------------------------------------------------------------------------------- 1 | mongoClient = DBMongo::getMongoClient(); 15 | $this->collection = DBMongo::getCollection('user'); 16 | } 17 | 18 | /** 19 | * @param $_id 20 | * @return object 21 | * @throws \Exception 22 | */ 23 | public function find($_id) 24 | { 25 | $user = $this->collection->findOne(['_id' => $_id], ['typeMap' => ['root' => 'object']]); 26 | return $user; 27 | } 28 | 29 | /** 30 | * @return array 31 | * @throws \Exception 32 | */ 33 | public function findAll() 34 | { 35 | $users = $this->collection->find([], ['typeMap' => ['root' => 'object']]); 36 | return $users->toArray(); 37 | } 38 | 39 | /** 40 | * @param $username 41 | * @return \stdClass|null 42 | * @throws \Exception 43 | */ 44 | public function findByUsername($username) 45 | { 46 | $user = $this->collection->findOne(['username' => $username], ['typeMap' => ['root' => 'object']]); 47 | return $user; 48 | } 49 | 50 | /** 51 | * @param $username 52 | * @param $email 53 | * @return User|\stdClass|null 54 | * @throws \Exception 55 | */ 56 | public function findOneByUsernameOrEmail($username, $email) 57 | { 58 | $user = $this->collection->findOne(['$or' => [['username' => $username],['email' => $email]]], ['typeMap' => ['root' => 'object']]); 59 | return $user; 60 | } 61 | 62 | /** 63 | * @param User $user 64 | * @return bool|mixed 65 | * @throws \Exception 66 | */ 67 | public function create($user) 68 | { 69 | if (isset($user -> _id)) 70 | return $this->update($user); 71 | 72 | /* Create new User Document */ 73 | //Generate New Object ID. 74 | $user->_id = DBMongo::getNewObjectId(); 75 | //Insert 76 | $insertResult = $this->collection -> insertOne($user); 77 | return $insertResult->isAcknowledged() ? $insertResult->getInsertedId() : false; 78 | } 79 | 80 | /** 81 | * @param User $user 82 | * @return bool 83 | * @throws \Exception 84 | */ 85 | public function update($user) 86 | { 87 | if (!isset($user->_id)) { 88 | // We can't update a record unless it exists... 89 | throw new \Exception( 90 | 'Cannot update user!, user Id is null or not a valid ID.' 91 | ); 92 | } 93 | 94 | return $this->collection->updateOne( 95 | ['_id' => $user->_id], 96 | [ '$set' => ['username' => $user->username, 97 | 'email' => $user->email, 98 | 'name' => $user->name, 99 | 'passwordHash' => $user->passwordHash 100 | ] 101 | ]) ->isAcknowledged(); 102 | } 103 | } -------------------------------------------------------------------------------- /Models/User.php: -------------------------------------------------------------------------------- 1 | _id = $data['_id']; 20 | $this->username = $data['username']; 21 | $this->passwordHash = $data['passwordHash']; 22 | $this->email = $data['email']; 23 | $this->name = $data['name']; 24 | 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Models/codes.php: -------------------------------------------------------------------------------- 1 | _id = $data["_id"]; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Repositories/LoginService.php: -------------------------------------------------------------------------------- 1 | findByUsername($username); 26 | 27 | if ($resultUser && password_verify($password, $resultUser->passwordHash)) { 28 | Session::saveLoginSession($resultUser->_id, $resultUser->username); 29 | return true; 30 | } 31 | 32 | Session::addErrorAlert('Username or Password are incorrect'); 33 | 34 | return false; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Repositories/RegisterService.php: -------------------------------------------------------------------------------- 1 | 256) { 44 | Session::addErrorAlert('Passwords is too long'); 45 | $validate = false; 46 | } 47 | 48 | //Validate Email Format 49 | if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { 50 | Session::addErrorAlert('Invalid Email Address'); 51 | $validate = false; 52 | } 53 | 54 | //Validate unique Email & Username 55 | $checkUser = $userRepository->findOneByUsernameOrEmail($username, $email); 56 | 57 | //Check Unique Username / Password 58 | if ($checkUser) { 59 | if ($checkUser->username == $username) 60 | Session::addErrorAlert('Username Already Used.'); 61 | if ($checkUser->email == $email) 62 | Session::addErrorAlert('Email Already Used.'); 63 | $validate = false; 64 | } 65 | 66 | if ($validate == false) 67 | return false; 68 | 69 | //Create User 70 | $newUser = new User( 71 | array( 72 | 'username' => $username, 73 | 'passwordHash' => password_hash($password, PASSWORD_DEFAULT), 74 | 'email' => $email, 75 | 'name' => $name 76 | ) 77 | ); 78 | 79 | //Save to DB 80 | $newUserID = $userRepository->create($newUser); 81 | 82 | if ($newUserID) { 83 | Session::saveLoginSession($newUserID, $newUser->username); 84 | return true; 85 | } 86 | 87 | return false; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /Views/Web/Account/Index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Views/Web/Account/Login.html: -------------------------------------------------------------------------------- 1 | 6 |
7 |
8 |
9 |
10 |

Login

11 |
12 |
13 |
14 | 15 |
16 | 17 | 18 |
19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | 27 |
28 |
29 |
30 |
31 | -------------------------------------------------------------------------------- /Views/Web/Account/Register.html: -------------------------------------------------------------------------------- 1 | 6 |
7 |
8 |
9 |
10 |

Register

11 |
12 |
13 |
14 |
15 | 16 | 17 |
18 | 19 |
20 | 21 | 22 |
23 | 24 |
25 | 26 | 27 |
28 | 29 |
30 | 31 | 32 |
33 | 34 |
35 | 36 | 37 |
38 | 39 |
40 | 41 |
42 |
43 |
44 |
-------------------------------------------------------------------------------- /Views/Web/Account/View.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |

7 |
8 |
9 |
10 |
11 |
12 |
    13 |
  • Profile Information
  • 14 |
  • Username: @
  • 15 |
  • Email:
  • 16 |
17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /Views/Web/Home/About.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

About Us

7 |

Here's some information about us.

8 |
9 |
10 |
11 |




12 |
13 |
14 |
15 |
16 |
17 |
18 |

Hello.

19 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis pharetra varius quam sit amet vulputate. 20 | Quisque mauris augue, molestie tincidunt condimentum vitae, gravida a libero. Aenean sit amet felis 21 | dolor, in sagittis nisi. Sed ac orci quis tortor imperdiet venenatis. Duis elementum auctor accumsan. 22 | Aliquam in felis sit amet augue. 23 |
24 |
25 |
26 |
27 |
28 |

Hello.

29 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis pharetra varius quam sit amet vulputate. 30 | Quisque mauris augue, molestie tincidunt condimentum vitae, gravida a libero. Aenean sit amet felis 31 | dolor, in sagittis nisi. Sed ac orci quis tortor imperdiet venenatis. Duis elementum auctor accumsan. 32 | Aliquam in felis sit amet augue. 33 |
34 |
35 |
36 |
37 |
-------------------------------------------------------------------------------- /Views/Web/Home/Index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 |

Start

7 |

A Simple PHP Framework

8 |

Created with Love by Daniel Mabadeje....... 9 |
10 |

11 |
12 |




13 |
-------------------------------------------------------------------------------- /Views/_FullMessages/StatusCodeMessage/403.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |



5 |

Oops!

6 |

403 FORBIDDEN!

7 |
8 |
9 |
10 |

11 | 15 |
16 |
-------------------------------------------------------------------------------- /Views/_FullMessages/StatusCodeMessage/404.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |



5 |

Oops!

6 |

404 Not Found

7 |
8 | Sorry, an error has occurred, Requested page not found!
9 |
10 |

11 | 15 |
16 |
-------------------------------------------------------------------------------- /Views/_FullMessages/StatusCodeMessage/500.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |



5 |

Oops!

6 |

7 |

8 | 12 |
13 |
-------------------------------------------------------------------------------- /Views/_FullMessages/error.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |



5 |
6 |
7 |
8 |

9 | 13 |
14 |
-------------------------------------------------------------------------------- /Views/_FullMessages/message.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |



5 |
6 |
7 |
8 |

9 | 13 |
14 |
-------------------------------------------------------------------------------- /Views/_Layouts/default/alerts/errors.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
-------------------------------------------------------------------------------- /Views/_Layouts/default/alerts/infos.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
-------------------------------------------------------------------------------- /Views/_Layouts/default/alerts/successes.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
-------------------------------------------------------------------------------- /Views/_Layouts/default/alerts/warnings.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
-------------------------------------------------------------------------------- /Views/_Layouts/default/footer.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /Views/_Layouts/default/header.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Views/_Layouts/default/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Views/_Layouts/default/meta.html: -------------------------------------------------------------------------------- 1 | 2 | <?= $meta['title'] ?> 3 | -------------------------------------------------------------------------------- /Webroot/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine on 3 | RewriteCond %{REQUEST_FILENAME} !-f 4 | RewriteCond %{REQUEST_FILENAME} !-d 5 | RewriteRule ^(.*)$ index.php [PT,L] 6 | -------------------------------------------------------------------------------- /Webroot/bootstrap/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/bootstrap/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /Webroot/bootstrap/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/bootstrap/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /Webroot/bootstrap/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/bootstrap/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /Webroot/bootstrap/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/bootstrap/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /Webroot/bootstrap/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/bootstrap/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /Webroot/bootstrap/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/bootstrap/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /Webroot/bootstrap/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/bootstrap/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /Webroot/bootstrap/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/bootstrap/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /Webroot/bootstrap/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/bootstrap/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /Webroot/bootstrap/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/bootstrap/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /Webroot/bootstrap/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/bootstrap/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /Webroot/bootstrap/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/bootstrap/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /Webroot/css/common.css: -------------------------------------------------------------------------------- 1 | /* 2 | This should contain all the common css to be used across, the name is not restricting, just make sure it is included 3 | in all the needed layouts. 4 | */ 5 | 6 | .footer-social:hover { 7 | -webkit-transform: scale(1.1); 8 | -moz-transform: scale(1.1); 9 | -o-transform: scale(1.1); 10 | } 11 | 12 | .footer-social { 13 | -webkit-transform: scale(0.8); 14 | -moz-transform: scale(0.8); 15 | -o-transform: scale(0.8); 16 | -webkit-transition-duration: 0.5s; 17 | -moz-transition-duration: 0.5s; 18 | -o-transition-duration: 0.5s; 19 | } 20 | 21 | #social-fb { 22 | color: #3B5998; 23 | } 24 | 25 | #social-tw { 26 | color: #4099FF; 27 | } 28 | 29 | #social-gp { 30 | color: #d34836; 31 | } 32 | 33 | #social-li { 34 | color: #0068a8; 35 | } 36 | 37 | #social-gh { 38 | color: #20252a; 39 | } 40 | 41 | #social-em { 42 | color: #f39c12; 43 | } 44 | 45 | #social-lv { 46 | color: #ba0002; 47 | } -------------------------------------------------------------------------------- /Webroot/css/error.css: -------------------------------------------------------------------------------- 1 | .error-template {padding: 40px 15px;text-align: center;} 2 | .error-actions {margin-top:15px;margin-bottom:15px;} 3 | .error-actions .btn { margin-right:10px; } -------------------------------------------------------------------------------- /Webroot/css/home.css: -------------------------------------------------------------------------------- 1 | /* 2 | This should contain all the css used in the homepage 3 | */ 4 | 5 | html,body { 6 | height:100%; 7 | } 8 | 9 | h1 { 10 | font-family: Arial,sans-serif; 11 | font-size:80px; 12 | color:#B9CAC4; 13 | } 14 | 15 | .lead { 16 | color: #50b497; 17 | } 18 | 19 | Custom container 20 | .container-full { 21 | margin: 0 auto; 22 | width: 100%; 23 | min-height:60%; 24 | max-height:70%; 25 | background-color: #0C2032; 26 | color:#eee; 27 | overflow:hidden; 28 | } 29 | 30 | .container-full a { 31 | color:#efefef; 32 | text-decoration:none; 33 | } 34 | 35 | .v-center { 36 | margin-top:7%; 37 | } 38 | 39 | body { 40 | margin: 0; 41 | width: 100%; 42 | height: 100vh; 43 | font-family: "Exo", sans-serif; 44 | color: #fff; 45 | background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab ); 46 | background-size: 400% 400%; 47 | -webkit-animation: gradientBG 10s ease infinite; 48 | animation: gradientBG 10s ease infinite; 49 | } 50 | /* .container { 51 | width: 100%; 52 | position: absolute; 53 | top: 35%; 54 | text-align: center; 55 | } */ 56 | /* .row { 57 | width: 100%; 58 | position: absolute; 59 | top: 35%; 60 | text-align: center; 61 | } */ 62 | 63 | h1 { 64 | font-weight: 900; 65 | } 66 | a { 67 | text-decoration: none; 68 | color: #212121; 69 | } 70 | @-webkit-keyframes gradientBG { 71 | 0% { 72 | background-position: 0% 50%; 73 | } 74 | 50% { 75 | background-position: 100% 50%; 76 | } 77 | 100% { 78 | background-position: 0% 50%; 79 | } 80 | } 81 | @keyframes gradientBG { 82 | 0% { 83 | background-position: 0% 50%; 84 | } 85 | 50% { 86 | background-position: 100% 50%; 87 | } 88 | 100% { 89 | background-position: 0% 50%; 90 | } 91 | } -------------------------------------------------------------------------------- /Webroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/Webroot/favicon.ico -------------------------------------------------------------------------------- /Webroot/index.php: -------------------------------------------------------------------------------- 1 | true)); 7 | DBMongo::set('mongo_db_default_name', 'default_database'); -------------------------------------------------------------------------------- /config/DbConfig/mysql.php: -------------------------------------------------------------------------------- 1 | Web route must match a route defined at routes table below. */ 32 | Config::set('default_route', 'Web'); 33 | Config::set('default_controller', 'Home'); 34 | Config::set('default_action', 'Index'); 35 | 36 | /* Routes Table 37 | Description: 38 | - Controllers of the route should be included in the /Controllers/{Route Name} directory. 39 | - Views of Route Controller should be included in the /Views/{Route Name}/{Controller}/ directory. 40 | */ 41 | Config::set('routes', array( 42 | // Route Name 43 | 'Web', 'Api', 'Admin' 44 | )); 45 | -------------------------------------------------------------------------------- /config/routes.php: -------------------------------------------------------------------------------- 1 | get('/', function() { 5 | // return "hello"; 6 | // }); 7 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | -------------------------------------------------------------------------------- /start: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | add(new GreetCommand()); 11 | $application->add(new MakeModel()); 12 | $application->add(new GetRoutes()); 13 | 14 | $application->run(); 15 | -------------------------------------------------------------------------------- /vendor/autoload.php: -------------------------------------------------------------------------------- 1 | setName($this->commandName) 24 | ->setDescription($this->commandDescription) 25 | // ->addArgument( 26 | // $this->commandArgumentName, 27 | // InputArgument::OPTIONAL, 28 | // $this->commandArgumentDescription 29 | // ) 30 | ->addOption( 31 | $this->commandOptionName, 32 | null, 33 | InputOption::VALUE_NONE, 34 | $this->commandOptionDescription 35 | ); 36 | } 37 | 38 | protected function execute(InputInterface $input, OutputInterface $output) 39 | { 40 | // $name = $input->getArgument($this->commandArgumentName); 41 | 42 | // if ($name) { 43 | // $text = 'Hello ' . $name; 44 | // } else { 45 | // $text = 'Hello'; 46 | // } 47 | 48 | if ($input->getOption($this->commandOptionName)) { 49 | // $text = strtoupper($text); 50 | echo "ok"; 51 | } 52 | $myfile = fopen("config/routes.php", "r") or die("Unable to open file!"); 53 | echo fread($myfile, filesize("config/routes.php")); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /vendor/commands/GreetCommand.php: -------------------------------------------------------------------------------- 1 | setName($this->commandName) 24 | ->setDescription($this->commandDescription) 25 | ->addArgument( 26 | $this->commandArgumentName, 27 | InputArgument::OPTIONAL, 28 | $this->commandArgumentDescription 29 | ) 30 | ->addOption( 31 | $this->commandOptionName, 32 | null, 33 | InputOption::VALUE_NONE, 34 | $this->commandOptionDescription 35 | ); 36 | } 37 | 38 | protected function execute(InputInterface $input, OutputInterface $output) 39 | { 40 | $name = $input->getArgument($this->commandArgumentName); 41 | 42 | if ($name) { 43 | $text = 'Hello ' . $name; 44 | } else { 45 | $text = 'Hello'; 46 | } 47 | 48 | if ($input->getOption($this->commandOptionName)) { 49 | $text = strtoupper($text); 50 | } 51 | $output->writeln($text); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /vendor/commands/MakeModel.php: -------------------------------------------------------------------------------- 1 | getOption(); 19 | protected $commandOptionDescription = 'If set, it will set the directory for model class to be created'; 20 | 21 | protected function configure() 22 | { 23 | $this 24 | ->setName($this->commandName) 25 | ->setDescription($this->commandDescription) 26 | ->addArgument( 27 | $this->commandArgumentName, 28 | InputArgument::OPTIONAL, 29 | $this->commandArgumentDescription 30 | ) 31 | ->addOption( 32 | $this->commandOptionName, 33 | null, 34 | InputOption::VALUE_NONE, 35 | $this->commandOptionDescription 36 | ); 37 | } 38 | 39 | protected function execute(InputInterface $input, OutputInterface $output) 40 | { 41 | $name = $input->getArgument($this->commandArgumentName); 42 | 43 | if ($name) { 44 | $text = $name; 45 | } else { 46 | return "error no model name given"; 47 | } 48 | 49 | if ($input->getOption($this->commandOptionName)) { 50 | var_dump($input->getOption($this->commandOptionName)); 51 | die(); 52 | $text = strtoupper($text); 53 | } 54 | $newFileName = 'Models/' . $text . ".php"; 55 | $newFileContent = '_id = $data["_id"]; 74 | } 75 | } 76 | }'; 77 | $myfile = fopen("Models/" . $text . ".php", "w") or die("Unable to open or create " . $text . ".php file!"); 78 | if ($myfile) { 79 | if (file_put_contents($newFileName, $newFileContent) !== false) { 80 | echo "Model created at " . basename($newFileName) . ""; 81 | } 82 | } else { 83 | echo "Cannot create Model " . basename($newFileName) . ""; 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/symfony/console'), 10 | ); 11 | -------------------------------------------------------------------------------- /vendor/composer/autoload_psr4.php: -------------------------------------------------------------------------------- 1 | array($baseDir . '/modules'), 10 | 'App\\' => array($baseDir . '/'), 11 | ); 12 | -------------------------------------------------------------------------------- /vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | = 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 27 | if ($useStaticLoader) { 28 | require_once __DIR__ . '/autoload_static.php'; 29 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInit9652f750dd136334778547177597b8d0::getInitializer($loader)); 31 | } else { 32 | $map = require __DIR__ . '/autoload_namespaces.php'; 33 | foreach ($map as $namespace => $path) { 34 | $loader->set($namespace, $path); 35 | } 36 | 37 | $map = require __DIR__ . '/autoload_psr4.php'; 38 | foreach ($map as $namespace => $path) { 39 | $loader->setPsr4($namespace, $path); 40 | } 41 | 42 | $classMap = require __DIR__ . '/autoload_classmap.php'; 43 | if ($classMap) { 44 | $loader->addClassMap($classMap); 45 | } 46 | } 47 | 48 | $loader->register(true); 49 | 50 | return $loader; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /vendor/composer/installed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "symfony/console", 4 | "version": "v2.6.7", 5 | "version_normalized": "2.6.7.0", 6 | "target-dir": "Symfony/Component/Console", 7 | "source": { 8 | "type": "git", 9 | "url": "https://github.com/symfony/console.git", 10 | "reference": "ebc5679854aa24ed7d65062e9e3ab0b18a917272" 11 | }, 12 | "dist": { 13 | "type": "zip", 14 | "url": "https://api.github.com/repos/symfony/console/zipball/ebc5679854aa24ed7d65062e9e3ab0b18a917272", 15 | "reference": "ebc5679854aa24ed7d65062e9e3ab0b18a917272", 16 | "shasum": "" 17 | }, 18 | "require": { 19 | "php": ">=5.3.3" 20 | }, 21 | "require-dev": { 22 | "psr/log": "~1.0", 23 | "symfony/event-dispatcher": "~2.1", 24 | "symfony/phpunit-bridge": "~2.7", 25 | "symfony/process": "~2.1" 26 | }, 27 | "suggest": { 28 | "psr/log": "For using the console logger", 29 | "symfony/event-dispatcher": "", 30 | "symfony/process": "" 31 | }, 32 | "time": "2015-05-02T15:18:45+00:00", 33 | "type": "library", 34 | "extra": { 35 | "branch-alias": { 36 | "dev-master": "2.6-dev" 37 | } 38 | }, 39 | "installation-source": "dist", 40 | "autoload": { 41 | "psr-0": { 42 | "Symfony\\Component\\Console\\": "" 43 | } 44 | }, 45 | "notification-url": "https://packagist.org/downloads/", 46 | "license": [ 47 | "MIT" 48 | ], 49 | "authors": [ 50 | { 51 | "name": "Fabien Potencier", 52 | "email": "fabien@symfony.com" 53 | }, 54 | { 55 | "name": "Symfony Community", 56 | "homepage": "https://symfony.com/contributors" 57 | } 58 | ], 59 | "description": "Symfony Console Component", 60 | "homepage": "https://symfony.com" 61 | } 62 | ] 63 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | composer.lock 3 | phpunit.xml 4 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | CHANGELOG 2 | ========= 3 | 4 | 2.6.0 5 | ----- 6 | 7 | * added a Process helper 8 | * added a DebugFormatter helper 9 | 10 | 2.5.0 11 | ----- 12 | 13 | * deprecated the dialog helper (use the question helper instead) 14 | * deprecated TableHelper in favor of Table 15 | * deprecated ProgressHelper in favor of ProgressBar 16 | * added ConsoleLogger 17 | * added a question helper 18 | * added a way to set the process name of a command 19 | * added a way to set a default command instead of `ListCommand` 20 | 21 | 2.4.0 22 | ----- 23 | 24 | * added a way to force terminal dimensions 25 | * added a convenient method to detect verbosity level 26 | * [BC BREAK] made descriptors use output instead of returning a string 27 | 28 | 2.3.0 29 | ----- 30 | 31 | * added multiselect support to the select dialog helper 32 | * added Table Helper for tabular data rendering 33 | * added support for events in `Application` 34 | * added a way to normalize EOLs in `ApplicationTester::getDisplay()` and `CommandTester::getDisplay()` 35 | * added a way to set the progress bar progress via the `setCurrent` method 36 | * added support for multiple InputOption shortcuts, written as `'-a|-b|-c'` 37 | * added two additional verbosity levels, VERBOSITY_VERY_VERBOSE and VERBOSITY_DEBUG 38 | 39 | 2.2.0 40 | ----- 41 | 42 | * added support for colorization on Windows via ConEmu 43 | * add a method to Dialog Helper to ask for a question and hide the response 44 | * added support for interactive selections in console (DialogHelper::select()) 45 | * added support for autocompletion as you type in Dialog Helper 46 | 47 | 2.1.0 48 | ----- 49 | 50 | * added ConsoleOutputInterface 51 | * added the possibility to disable a command (Command::isEnabled()) 52 | * added suggestions when a command does not exist 53 | * added a --raw option to the list command 54 | * added support for STDERR in the console output class (errors are now sent 55 | to STDERR) 56 | * made the defaults (helper set, commands, input definition) in Application 57 | more easily customizable 58 | * added support for the shell even if readline is not available 59 | * added support for process isolation in Symfony shell via 60 | `--process-isolation` switch 61 | * added support for `--`, which disables options parsing after that point 62 | (tokens will be parsed as arguments) 63 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Command/HelpCommand.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Command; 13 | 14 | use Symfony\Component\Console\Helper\DescriptorHelper; 15 | use Symfony\Component\Console\Input\InputArgument; 16 | use Symfony\Component\Console\Input\InputOption; 17 | use Symfony\Component\Console\Input\InputInterface; 18 | use Symfony\Component\Console\Output\OutputInterface; 19 | 20 | /** 21 | * HelpCommand displays the help for a given command. 22 | * 23 | * @author Fabien Potencier 24 | */ 25 | class HelpCommand extends Command 26 | { 27 | private $command; 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | protected function configure() 33 | { 34 | $this->ignoreValidationErrors(); 35 | 36 | $this 37 | ->setName('help') 38 | ->setDefinition(array( 39 | new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), 40 | new InputOption('xml', null, InputOption::VALUE_NONE, 'To output help as XML'), 41 | new InputOption('format', null, InputOption::VALUE_REQUIRED, 'To output help in other formats', 'txt'), 42 | new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), 43 | )) 44 | ->setDescription('Displays help for a command') 45 | ->setHelp(<<%command.name% command displays help for a given command: 47 | 48 | php %command.full_name% list 49 | 50 | You can also output the help in other formats by using the --format option: 51 | 52 | php %command.full_name% --format=xml list 53 | 54 | To display the list of available commands, please use the list command. 55 | EOF 56 | ) 57 | ; 58 | } 59 | 60 | /** 61 | * Sets the command. 62 | * 63 | * @param Command $command The command to set 64 | */ 65 | public function setCommand(Command $command) 66 | { 67 | $this->command = $command; 68 | } 69 | 70 | /** 71 | * {@inheritdoc} 72 | */ 73 | protected function execute(InputInterface $input, OutputInterface $output) 74 | { 75 | if (null === $this->command) { 76 | $this->command = $this->getApplication()->find($input->getArgument('command_name')); 77 | } 78 | 79 | if ($input->getOption('xml')) { 80 | $input->setOption('format', 'xml'); 81 | } 82 | 83 | $helper = new DescriptorHelper(); 84 | $helper->describe($output, $this->command, array( 85 | 'format' => $input->getOption('format'), 86 | 'raw_text' => $input->getOption('raw'), 87 | )); 88 | 89 | $this->command = null; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Command/ListCommand.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Command; 13 | 14 | use Symfony\Component\Console\Helper\DescriptorHelper; 15 | use Symfony\Component\Console\Input\InputArgument; 16 | use Symfony\Component\Console\Input\InputOption; 17 | use Symfony\Component\Console\Input\InputInterface; 18 | use Symfony\Component\Console\Output\OutputInterface; 19 | use Symfony\Component\Console\Input\InputDefinition; 20 | 21 | /** 22 | * ListCommand displays the list of all available commands for the application. 23 | * 24 | * @author Fabien Potencier 25 | */ 26 | class ListCommand extends Command 27 | { 28 | /** 29 | * {@inheritdoc} 30 | */ 31 | protected function configure() 32 | { 33 | $this 34 | ->setName('list') 35 | ->setDefinition($this->createDefinition()) 36 | ->setDescription('Lists commands') 37 | ->setHelp(<<%command.name% command lists all commands: 39 | 40 | php %command.full_name% 41 | 42 | You can also display the commands for a specific namespace: 43 | 44 | php %command.full_name% test 45 | 46 | You can also output the information in other formats by using the --format option: 47 | 48 | php %command.full_name% --format=xml 49 | 50 | It's also possible to get raw list of commands (useful for embedding command runner): 51 | 52 | php %command.full_name% --raw 53 | EOF 54 | ) 55 | ; 56 | } 57 | 58 | /** 59 | * {@inheritdoc} 60 | */ 61 | public function getNativeDefinition() 62 | { 63 | return $this->createDefinition(); 64 | } 65 | 66 | /** 67 | * {@inheritdoc} 68 | */ 69 | protected function execute(InputInterface $input, OutputInterface $output) 70 | { 71 | if ($input->getOption('xml')) { 72 | $input->setOption('format', 'xml'); 73 | } 74 | 75 | $helper = new DescriptorHelper(); 76 | $helper->describe($output, $this->getApplication(), array( 77 | 'format' => $input->getOption('format'), 78 | 'raw_text' => $input->getOption('raw'), 79 | 'namespace' => $input->getArgument('namespace'), 80 | )); 81 | } 82 | 83 | /** 84 | * {@inheritdoc} 85 | */ 86 | private function createDefinition() 87 | { 88 | return new InputDefinition(array( 89 | new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), 90 | new InputOption('xml', null, InputOption::VALUE_NONE, 'To output list as XML'), 91 | new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), 92 | new InputOption('format', null, InputOption::VALUE_REQUIRED, 'To output list in other formats', 'txt'), 93 | )); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/ConsoleEvents.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console; 13 | 14 | /** 15 | * Contains all events dispatched by an Application. 16 | * 17 | * @author Francesco Levorato 18 | */ 19 | final class ConsoleEvents 20 | { 21 | /** 22 | * The COMMAND event allows you to attach listeners before any command is 23 | * executed by the console. It also allows you to modify the command, input and output 24 | * before they are handled to the command. 25 | * 26 | * The event listener method receives a Symfony\Component\Console\Event\ConsoleCommandEvent 27 | * instance. 28 | * 29 | * @Event 30 | * 31 | * @var string 32 | */ 33 | const COMMAND = 'console.command'; 34 | 35 | /** 36 | * The TERMINATE event allows you to attach listeners after a command is 37 | * executed by the console. 38 | * 39 | * The event listener method receives a Symfony\Component\Console\Event\ConsoleTerminateEvent 40 | * instance. 41 | * 42 | * @Event 43 | * 44 | * @var string 45 | */ 46 | const TERMINATE = 'console.terminate'; 47 | 48 | /** 49 | * The EXCEPTION event occurs when an uncaught exception appears. 50 | * 51 | * This event allows you to deal with the exception or 52 | * to modify the thrown exception. The event listener method receives 53 | * a Symfony\Component\Console\Event\ConsoleExceptionEvent 54 | * instance. 55 | * 56 | * @Event 57 | * 58 | * @var string 59 | */ 60 | const EXCEPTION = 'console.exception'; 61 | } 62 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Descriptor/DescriptorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Descriptor; 13 | 14 | use Symfony\Component\Console\Output\OutputInterface; 15 | 16 | /** 17 | * Descriptor interface. 18 | * 19 | * @author Jean-François Simon 20 | */ 21 | interface DescriptorInterface 22 | { 23 | /** 24 | * Describes an InputArgument instance. 25 | * 26 | * @param OutputInterface $output 27 | * @param object $object 28 | * @param array $options 29 | */ 30 | public function describe(OutputInterface $output, $object, array $options = array()); 31 | } 32 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Event/ConsoleCommandEvent.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Event; 13 | 14 | /** 15 | * Allows to do things before the command is executed, like skipping the command or changing the input. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | class ConsoleCommandEvent extends ConsoleEvent 20 | { 21 | /** 22 | * The return code for skipped commands, this will also be passed into the terminate event 23 | */ 24 | const RETURN_CODE_DISABLED = 113; 25 | 26 | /** 27 | * Indicates if the command should be run or skipped 28 | * 29 | * @var bool 30 | */ 31 | private $commandShouldRun = true; 32 | 33 | /** 34 | * Disables the command, so it won't be run 35 | * 36 | * @return bool 37 | */ 38 | public function disableCommand() 39 | { 40 | return $this->commandShouldRun = false; 41 | } 42 | 43 | /** 44 | * Enables the command 45 | * 46 | * @return bool 47 | */ 48 | public function enableCommand() 49 | { 50 | return $this->commandShouldRun = true; 51 | } 52 | 53 | /** 54 | * Returns true if the command is runnable, false otherwise 55 | * 56 | * @return bool 57 | */ 58 | public function commandShouldRun() 59 | { 60 | return $this->commandShouldRun; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Event/ConsoleEvent.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Event; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | use Symfony\Component\Console\Input\InputInterface; 16 | use Symfony\Component\Console\Output\OutputInterface; 17 | use Symfony\Component\EventDispatcher\Event; 18 | 19 | /** 20 | * Allows to inspect input and output of a command. 21 | * 22 | * @author Francesco Levorato 23 | */ 24 | class ConsoleEvent extends Event 25 | { 26 | protected $command; 27 | 28 | private $input; 29 | private $output; 30 | 31 | public function __construct(Command $command, InputInterface $input, OutputInterface $output) 32 | { 33 | $this->command = $command; 34 | $this->input = $input; 35 | $this->output = $output; 36 | } 37 | 38 | /** 39 | * Gets the command that is executed. 40 | * 41 | * @return Command A Command instance 42 | */ 43 | public function getCommand() 44 | { 45 | return $this->command; 46 | } 47 | 48 | /** 49 | * Gets the input instance. 50 | * 51 | * @return InputInterface An InputInterface instance 52 | */ 53 | public function getInput() 54 | { 55 | return $this->input; 56 | } 57 | 58 | /** 59 | * Gets the output instance. 60 | * 61 | * @return OutputInterface An OutputInterface instance 62 | */ 63 | public function getOutput() 64 | { 65 | return $this->output; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Event/ConsoleExceptionEvent.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Event; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | use Symfony\Component\Console\Input\InputInterface; 16 | use Symfony\Component\Console\Output\OutputInterface; 17 | 18 | /** 19 | * Allows to handle exception thrown in a command. 20 | * 21 | * @author Fabien Potencier 22 | */ 23 | class ConsoleExceptionEvent extends ConsoleEvent 24 | { 25 | private $exception; 26 | private $exitCode; 27 | 28 | public function __construct(Command $command, InputInterface $input, OutputInterface $output, \Exception $exception, $exitCode) 29 | { 30 | parent::__construct($command, $input, $output); 31 | 32 | $this->setException($exception); 33 | $this->exitCode = (int) $exitCode; 34 | } 35 | 36 | /** 37 | * Returns the thrown exception. 38 | * 39 | * @return \Exception The thrown exception 40 | */ 41 | public function getException() 42 | { 43 | return $this->exception; 44 | } 45 | 46 | /** 47 | * Replaces the thrown exception. 48 | * 49 | * This exception will be thrown if no response is set in the event. 50 | * 51 | * @param \Exception $exception The thrown exception 52 | */ 53 | public function setException(\Exception $exception) 54 | { 55 | $this->exception = $exception; 56 | } 57 | 58 | /** 59 | * Gets the exit code. 60 | * 61 | * @return int The command exit code 62 | */ 63 | public function getExitCode() 64 | { 65 | return $this->exitCode; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Event/ConsoleTerminateEvent.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Event; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | use Symfony\Component\Console\Input\InputInterface; 16 | use Symfony\Component\Console\Output\OutputInterface; 17 | 18 | /** 19 | * Allows to manipulate the exit code of a command after its execution. 20 | * 21 | * @author Francesco Levorato 22 | */ 23 | class ConsoleTerminateEvent extends ConsoleEvent 24 | { 25 | /** 26 | * The exit code of the command. 27 | * 28 | * @var int 29 | */ 30 | private $exitCode; 31 | 32 | public function __construct(Command $command, InputInterface $input, OutputInterface $output, $exitCode) 33 | { 34 | parent::__construct($command, $input, $output); 35 | 36 | $this->setExitCode($exitCode); 37 | } 38 | 39 | /** 40 | * Sets the exit code. 41 | * 42 | * @param int $exitCode The command exit code 43 | */ 44 | public function setExitCode($exitCode) 45 | { 46 | $this->exitCode = (int) $exitCode; 47 | } 48 | 49 | /** 50 | * Gets the exit code. 51 | * 52 | * @return int The command exit code 53 | */ 54 | public function getExitCode() 55 | { 56 | return $this->exitCode; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Formatter; 13 | 14 | /** 15 | * Formatter interface for console output. 16 | * 17 | * @author Konstantin Kudryashov 18 | * 19 | * @api 20 | */ 21 | interface OutputFormatterInterface 22 | { 23 | /** 24 | * Sets the decorated flag. 25 | * 26 | * @param bool $decorated Whether to decorate the messages or not 27 | * 28 | * @api 29 | */ 30 | public function setDecorated($decorated); 31 | 32 | /** 33 | * Gets the decorated flag. 34 | * 35 | * @return bool true if the output will decorate messages, false otherwise 36 | * 37 | * @api 38 | */ 39 | public function isDecorated(); 40 | 41 | /** 42 | * Sets a new style. 43 | * 44 | * @param string $name The style name 45 | * @param OutputFormatterStyleInterface $style The style instance 46 | * 47 | * @api 48 | */ 49 | public function setStyle($name, OutputFormatterStyleInterface $style); 50 | 51 | /** 52 | * Checks if output formatter has style with specified name. 53 | * 54 | * @param string $name 55 | * 56 | * @return bool 57 | * 58 | * @api 59 | */ 60 | public function hasStyle($name); 61 | 62 | /** 63 | * Gets style options from style with specified name. 64 | * 65 | * @param string $name 66 | * 67 | * @return OutputFormatterStyleInterface 68 | * 69 | * @api 70 | */ 71 | public function getStyle($name); 72 | 73 | /** 74 | * Formats a message according to the given styles. 75 | * 76 | * @param string $message The message to style 77 | * 78 | * @return string The styled message 79 | * 80 | * @api 81 | */ 82 | public function format($message); 83 | } 84 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Formatter; 13 | 14 | /** 15 | * Formatter style interface for defining styles. 16 | * 17 | * @author Konstantin Kudryashov 18 | * 19 | * @api 20 | */ 21 | interface OutputFormatterStyleInterface 22 | { 23 | /** 24 | * Sets style foreground color. 25 | * 26 | * @param string $color The color name 27 | * 28 | * @api 29 | */ 30 | public function setForeground($color = null); 31 | 32 | /** 33 | * Sets style background color. 34 | * 35 | * @param string $color The color name 36 | * 37 | * @api 38 | */ 39 | public function setBackground($color = null); 40 | 41 | /** 42 | * Sets some specific style option. 43 | * 44 | * @param string $option The option name 45 | * 46 | * @api 47 | */ 48 | public function setOption($option); 49 | 50 | /** 51 | * Unsets some specific style option. 52 | * 53 | * @param string $option The option name 54 | */ 55 | public function unsetOption($option); 56 | 57 | /** 58 | * Sets multiple style options at once. 59 | * 60 | * @param array $options 61 | */ 62 | public function setOptions(array $options); 63 | 64 | /** 65 | * Applies the style to a given text. 66 | * 67 | * @param string $text The text to style 68 | * 69 | * @return string 70 | */ 71 | public function apply($text); 72 | } 73 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Formatter; 13 | 14 | /** 15 | * @author Jean-François Simon 16 | */ 17 | class OutputFormatterStyleStack 18 | { 19 | /** 20 | * @var OutputFormatterStyleInterface[] 21 | */ 22 | private $styles; 23 | 24 | /** 25 | * @var OutputFormatterStyleInterface 26 | */ 27 | private $emptyStyle; 28 | 29 | /** 30 | * Constructor. 31 | * 32 | * @param OutputFormatterStyleInterface|null $emptyStyle 33 | */ 34 | public function __construct(OutputFormatterStyleInterface $emptyStyle = null) 35 | { 36 | $this->emptyStyle = $emptyStyle ?: new OutputFormatterStyle(); 37 | $this->reset(); 38 | } 39 | 40 | /** 41 | * Resets stack (ie. empty internal arrays). 42 | */ 43 | public function reset() 44 | { 45 | $this->styles = array(); 46 | } 47 | 48 | /** 49 | * Pushes a style in the stack. 50 | * 51 | * @param OutputFormatterStyleInterface $style 52 | */ 53 | public function push(OutputFormatterStyleInterface $style) 54 | { 55 | $this->styles[] = $style; 56 | } 57 | 58 | /** 59 | * Pops a style from the stack. 60 | * 61 | * @param OutputFormatterStyleInterface|null $style 62 | * 63 | * @return OutputFormatterStyleInterface 64 | * 65 | * @throws \InvalidArgumentException When style tags incorrectly nested 66 | */ 67 | public function pop(OutputFormatterStyleInterface $style = null) 68 | { 69 | if (empty($this->styles)) { 70 | return $this->emptyStyle; 71 | } 72 | 73 | if (null === $style) { 74 | return array_pop($this->styles); 75 | } 76 | 77 | foreach (array_reverse($this->styles, true) as $index => $stackedStyle) { 78 | if ($style->apply('') === $stackedStyle->apply('')) { 79 | $this->styles = array_slice($this->styles, 0, $index); 80 | 81 | return $stackedStyle; 82 | } 83 | } 84 | 85 | throw new \InvalidArgumentException('Incorrectly nested style tag found.'); 86 | } 87 | 88 | /** 89 | * Computes current style with stacks top codes. 90 | * 91 | * @return OutputFormatterStyle 92 | */ 93 | public function getCurrent() 94 | { 95 | if (empty($this->styles)) { 96 | return $this->emptyStyle; 97 | } 98 | 99 | return $this->styles[count($this->styles) - 1]; 100 | } 101 | 102 | /** 103 | * @param OutputFormatterStyleInterface $emptyStyle 104 | * 105 | * @return OutputFormatterStyleStack 106 | */ 107 | public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle) 108 | { 109 | $this->emptyStyle = $emptyStyle; 110 | 111 | return $this; 112 | } 113 | 114 | /** 115 | * @return OutputFormatterStyleInterface 116 | */ 117 | public function getEmptyStyle() 118 | { 119 | return $this->emptyStyle; 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Helper/DescriptorHelper.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | use Symfony\Component\Console\Descriptor\DescriptorInterface; 15 | use Symfony\Component\Console\Descriptor\JsonDescriptor; 16 | use Symfony\Component\Console\Descriptor\MarkdownDescriptor; 17 | use Symfony\Component\Console\Descriptor\TextDescriptor; 18 | use Symfony\Component\Console\Descriptor\XmlDescriptor; 19 | use Symfony\Component\Console\Output\OutputInterface; 20 | 21 | /** 22 | * This class adds helper method to describe objects in various formats. 23 | * 24 | * @author Jean-François Simon 25 | */ 26 | class DescriptorHelper extends Helper 27 | { 28 | /** 29 | * @var DescriptorInterface[] 30 | */ 31 | private $descriptors = array(); 32 | 33 | /** 34 | * Constructor. 35 | */ 36 | public function __construct() 37 | { 38 | $this 39 | ->register('txt', new TextDescriptor()) 40 | ->register('xml', new XmlDescriptor()) 41 | ->register('json', new JsonDescriptor()) 42 | ->register('md', new MarkdownDescriptor()) 43 | ; 44 | } 45 | 46 | /** 47 | * Describes an object if supported. 48 | * 49 | * Available options are: 50 | * * format: string, the output format name 51 | * * raw_text: boolean, sets output type as raw 52 | * 53 | * @param OutputInterface $output 54 | * @param object $object 55 | * @param array $options 56 | * 57 | * @throws \InvalidArgumentException when the given format is not supported 58 | */ 59 | public function describe(OutputInterface $output, $object, array $options = array()) 60 | { 61 | $options = array_merge(array( 62 | 'raw_text' => false, 63 | 'format' => 'txt', 64 | ), $options); 65 | 66 | if (!isset($this->descriptors[$options['format']])) { 67 | throw new \InvalidArgumentException(sprintf('Unsupported format "%s".', $options['format'])); 68 | } 69 | 70 | $descriptor = $this->descriptors[$options['format']]; 71 | $descriptor->describe($output, $object, $options); 72 | } 73 | 74 | /** 75 | * Registers a descriptor. 76 | * 77 | * @param string $format 78 | * @param DescriptorInterface $descriptor 79 | * 80 | * @return DescriptorHelper 81 | */ 82 | public function register($format, DescriptorInterface $descriptor) 83 | { 84 | $this->descriptors[$format] = $descriptor; 85 | 86 | return $this; 87 | } 88 | 89 | /** 90 | * {@inheritdoc} 91 | */ 92 | public function getName() 93 | { 94 | return 'descriptor'; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Helper/FormatterHelper.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | use Symfony\Component\Console\Formatter\OutputFormatter; 15 | 16 | /** 17 | * The Formatter class provides helpers to format messages. 18 | * 19 | * @author Fabien Potencier 20 | */ 21 | class FormatterHelper extends Helper 22 | { 23 | /** 24 | * Formats a message within a section. 25 | * 26 | * @param string $section The section name 27 | * @param string $message The message 28 | * @param string $style The style to apply to the section 29 | * 30 | * @return string The format section 31 | */ 32 | public function formatSection($section, $message, $style = 'info') 33 | { 34 | return sprintf('<%s>[%s] %s', $style, $section, $style, $message); 35 | } 36 | 37 | /** 38 | * Formats a message as a block of text. 39 | * 40 | * @param string|array $messages The message to write in the block 41 | * @param string $style The style to apply to the whole block 42 | * @param bool $large Whether to return a large block 43 | * 44 | * @return string The formatter message 45 | */ 46 | public function formatBlock($messages, $style, $large = false) 47 | { 48 | if (!is_array($messages)) { 49 | $messages = array($messages); 50 | } 51 | 52 | $len = 0; 53 | $lines = array(); 54 | foreach ($messages as $message) { 55 | $message = OutputFormatter::escape($message); 56 | $lines[] = sprintf($large ? ' %s ' : ' %s ', $message); 57 | $len = max($this->strlen($message) + ($large ? 4 : 2), $len); 58 | } 59 | 60 | $messages = $large ? array(str_repeat(' ', $len)) : array(); 61 | for ($i = 0; isset($lines[$i]); ++$i) { 62 | $messages[] = $lines[$i].str_repeat(' ', $len - $this->strlen($lines[$i])); 63 | } 64 | if ($large) { 65 | $messages[] = str_repeat(' ', $len); 66 | } 67 | 68 | for ($i = 0; isset($messages[$i]); ++$i) { 69 | $messages[$i] = sprintf('<%s>%s', $style, $messages[$i], $style); 70 | } 71 | 72 | return implode("\n", $messages); 73 | } 74 | 75 | /** 76 | * {@inheritdoc} 77 | */ 78 | public function getName() 79 | { 80 | return 'formatter'; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Helper/HelperInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | /** 15 | * HelperInterface is the interface all helpers must implement. 16 | * 17 | * @author Fabien Potencier 18 | * 19 | * @api 20 | */ 21 | interface HelperInterface 22 | { 23 | /** 24 | * Sets the helper set associated with this helper. 25 | * 26 | * @param HelperSet $helperSet A HelperSet instance 27 | * 28 | * @api 29 | */ 30 | public function setHelperSet(HelperSet $helperSet = null); 31 | 32 | /** 33 | * Gets the helper set associated with this helper. 34 | * 35 | * @return HelperSet A HelperSet instance 36 | * 37 | * @api 38 | */ 39 | public function getHelperSet(); 40 | 41 | /** 42 | * Returns the canonical name of this helper. 43 | * 44 | * @return string The canonical name 45 | * 46 | * @api 47 | */ 48 | public function getName(); 49 | } 50 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Helper/HelperSet.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | 16 | /** 17 | * HelperSet represents a set of helpers to be used with a command. 18 | * 19 | * @author Fabien Potencier 20 | */ 21 | class HelperSet implements \IteratorAggregate 22 | { 23 | private $helpers = array(); 24 | private $command; 25 | 26 | /** 27 | * Constructor. 28 | * 29 | * @param Helper[] $helpers An array of helper. 30 | */ 31 | public function __construct(array $helpers = array()) 32 | { 33 | foreach ($helpers as $alias => $helper) { 34 | $this->set($helper, is_int($alias) ? null : $alias); 35 | } 36 | } 37 | 38 | /** 39 | * Sets a helper. 40 | * 41 | * @param HelperInterface $helper The helper instance 42 | * @param string $alias An alias 43 | */ 44 | public function set(HelperInterface $helper, $alias = null) 45 | { 46 | $this->helpers[$helper->getName()] = $helper; 47 | if (null !== $alias) { 48 | $this->helpers[$alias] = $helper; 49 | } 50 | 51 | $helper->setHelperSet($this); 52 | } 53 | 54 | /** 55 | * Returns true if the helper if defined. 56 | * 57 | * @param string $name The helper name 58 | * 59 | * @return bool true if the helper is defined, false otherwise 60 | */ 61 | public function has($name) 62 | { 63 | return isset($this->helpers[$name]); 64 | } 65 | 66 | /** 67 | * Gets a helper value. 68 | * 69 | * @param string $name The helper name 70 | * 71 | * @return HelperInterface The helper instance 72 | * 73 | * @throws \InvalidArgumentException if the helper is not defined 74 | */ 75 | public function get($name) 76 | { 77 | if (!$this->has($name)) { 78 | throw new \InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name)); 79 | } 80 | 81 | return $this->helpers[$name]; 82 | } 83 | 84 | /** 85 | * Sets the command associated with this helper set. 86 | * 87 | * @param Command $command A Command instance 88 | */ 89 | public function setCommand(Command $command = null) 90 | { 91 | $this->command = $command; 92 | } 93 | 94 | /** 95 | * Gets the command associated with this helper set. 96 | * 97 | * @return Command A Command instance 98 | */ 99 | public function getCommand() 100 | { 101 | return $this->command; 102 | } 103 | 104 | public function getIterator() 105 | { 106 | return new \ArrayIterator($this->helpers); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Helper/InputAwareHelper.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | use Symfony\Component\Console\Input\InputInterface; 15 | use Symfony\Component\Console\Input\InputAwareInterface; 16 | 17 | /** 18 | * An implementation of InputAwareInterface for Helpers. 19 | * 20 | * @author Wouter J 21 | */ 22 | abstract class InputAwareHelper extends Helper implements InputAwareInterface 23 | { 24 | protected $input; 25 | 26 | /** 27 | * {@inheritdoc} 28 | */ 29 | public function setInput(InputInterface $input) 30 | { 31 | $this->input = $input; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Helper/TableSeparator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | /** 15 | * Marks a row as being a separator. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | class TableSeparator 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Input/InputAwareInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Input; 13 | 14 | /** 15 | * InputAwareInterface should be implemented by classes that depends on the 16 | * Console Input. 17 | * 18 | * @author Wouter J 19 | */ 20 | interface InputAwareInterface 21 | { 22 | /** 23 | * Sets the Console Input. 24 | * 25 | * @param InputInterface 26 | */ 27 | public function setInput(InputInterface $input); 28 | } 29 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Input; 13 | 14 | /** 15 | * StringInput represents an input provided as a string. 16 | * 17 | * Usage: 18 | * 19 | * $input = new StringInput('foo --bar="foobar"'); 20 | * 21 | * @author Fabien Potencier 22 | * 23 | * @api 24 | */ 25 | class StringInput extends ArgvInput 26 | { 27 | const REGEX_STRING = '([^\s]+?)(?:\s|(?setTokens($this->tokenize($input)); 45 | 46 | if (null !== $definition) { 47 | $this->bind($definition); 48 | } 49 | } 50 | 51 | /** 52 | * Tokenizes a string. 53 | * 54 | * @param string $input The input to tokenize 55 | * 56 | * @return array An array of tokens 57 | * 58 | * @throws \InvalidArgumentException When unable to parse input (should never happen) 59 | */ 60 | private function tokenize($input) 61 | { 62 | $tokens = array(); 63 | $length = strlen($input); 64 | $cursor = 0; 65 | while ($cursor < $length) { 66 | if (preg_match('/\s+/A', $input, $match, null, $cursor)) { 67 | } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, null, $cursor)) { 68 | $tokens[] = $match[1].$match[2].stripcslashes(str_replace(array('"\'', '\'"', '\'\'', '""'), '', substr($match[3], 1, strlen($match[3]) - 2))); 69 | } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, null, $cursor)) { 70 | $tokens[] = stripcslashes(substr($match[0], 1, strlen($match[0]) - 2)); 71 | } elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, null, $cursor)) { 72 | $tokens[] = stripcslashes($match[1]); 73 | } else { 74 | // should never happen 75 | throw new \InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10))); 76 | } 77 | 78 | $cursor += strlen($match[0]); 79 | } 80 | 81 | return $tokens; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2015 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Output/BufferedOutput.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Output; 13 | 14 | /** 15 | * @author Jean-François Simon 16 | */ 17 | class BufferedOutput extends Output 18 | { 19 | /** 20 | * @var string 21 | */ 22 | private $buffer = ''; 23 | 24 | /** 25 | * Empties buffer and returns its content. 26 | * 27 | * @return string 28 | */ 29 | public function fetch() 30 | { 31 | $content = $this->buffer; 32 | $this->buffer = ''; 33 | 34 | return $content; 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | protected function doWrite($message, $newline) 41 | { 42 | $this->buffer .= $message; 43 | 44 | if ($newline) { 45 | $this->buffer .= "\n"; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Output/ConsoleOutput.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Output; 13 | 14 | use Symfony\Component\Console\Formatter\OutputFormatterInterface; 15 | 16 | /** 17 | * ConsoleOutput is the default class for all CLI output. It uses STDOUT. 18 | * 19 | * This class is a convenient wrapper around `StreamOutput`. 20 | * 21 | * $output = new ConsoleOutput(); 22 | * 23 | * This is equivalent to: 24 | * 25 | * $output = new StreamOutput(fopen('php://stdout', 'w')); 26 | * 27 | * @author Fabien Potencier 28 | * 29 | * @api 30 | */ 31 | class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface 32 | { 33 | private $stderr; 34 | 35 | /** 36 | * Constructor. 37 | * 38 | * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) 39 | * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) 40 | * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) 41 | * 42 | * @api 43 | */ 44 | public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null) 45 | { 46 | $outputStream = 'php://stdout'; 47 | if (!$this->hasStdoutSupport()) { 48 | $outputStream = 'php://output'; 49 | } 50 | 51 | parent::__construct(fopen($outputStream, 'w'), $verbosity, $decorated, $formatter); 52 | 53 | $this->stderr = new StreamOutput(fopen('php://stderr', 'w'), $verbosity, $decorated, $this->getFormatter()); 54 | } 55 | 56 | /** 57 | * {@inheritdoc} 58 | */ 59 | public function setDecorated($decorated) 60 | { 61 | parent::setDecorated($decorated); 62 | $this->stderr->setDecorated($decorated); 63 | } 64 | 65 | /** 66 | * {@inheritdoc} 67 | */ 68 | public function setFormatter(OutputFormatterInterface $formatter) 69 | { 70 | parent::setFormatter($formatter); 71 | $this->stderr->setFormatter($formatter); 72 | } 73 | 74 | /** 75 | * {@inheritdoc} 76 | */ 77 | public function setVerbosity($level) 78 | { 79 | parent::setVerbosity($level); 80 | $this->stderr->setVerbosity($level); 81 | } 82 | 83 | /** 84 | * {@inheritdoc} 85 | */ 86 | public function getErrorOutput() 87 | { 88 | return $this->stderr; 89 | } 90 | 91 | /** 92 | * {@inheritdoc} 93 | */ 94 | public function setErrorOutput(OutputInterface $error) 95 | { 96 | $this->stderr = $error; 97 | } 98 | 99 | /** 100 | * Returns true if current environment supports writing console output to 101 | * STDOUT. 102 | * 103 | * IBM iSeries (OS400) exhibits character-encoding issues when writing to 104 | * STDOUT and doesn't properly convert ASCII to EBCDIC, resulting in garbage 105 | * output. 106 | * 107 | * @return bool 108 | */ 109 | protected function hasStdoutSupport() 110 | { 111 | return ('OS400' != php_uname('s')); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Output/ConsoleOutputInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Output; 13 | 14 | /** 15 | * ConsoleOutputInterface is the interface implemented by ConsoleOutput class. 16 | * This adds information about stderr output stream. 17 | * 18 | * @author Dariusz Górecki 19 | */ 20 | interface ConsoleOutputInterface extends OutputInterface 21 | { 22 | /** 23 | * Gets the OutputInterface for errors. 24 | * 25 | * @return OutputInterface 26 | */ 27 | public function getErrorOutput(); 28 | 29 | /** 30 | * Sets the OutputInterface used for errors. 31 | * 32 | * @param OutputInterface $error 33 | */ 34 | public function setErrorOutput(OutputInterface $error); 35 | } 36 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Output/NullOutput.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Output; 13 | 14 | use Symfony\Component\Console\Formatter\OutputFormatter; 15 | use Symfony\Component\Console\Formatter\OutputFormatterInterface; 16 | 17 | /** 18 | * NullOutput suppresses all output. 19 | * 20 | * $output = new NullOutput(); 21 | * 22 | * @author Fabien Potencier 23 | * @author Tobias Schultze 24 | * 25 | * @api 26 | */ 27 | class NullOutput implements OutputInterface 28 | { 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | public function setFormatter(OutputFormatterInterface $formatter) 33 | { 34 | // do nothing 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | public function getFormatter() 41 | { 42 | // to comply with the interface we must return a OutputFormatterInterface 43 | return new OutputFormatter(); 44 | } 45 | 46 | /** 47 | * {@inheritdoc} 48 | */ 49 | public function setDecorated($decorated) 50 | { 51 | // do nothing 52 | } 53 | 54 | /** 55 | * {@inheritdoc} 56 | */ 57 | public function isDecorated() 58 | { 59 | return false; 60 | } 61 | 62 | /** 63 | * {@inheritdoc} 64 | */ 65 | public function setVerbosity($level) 66 | { 67 | // do nothing 68 | } 69 | 70 | /** 71 | * {@inheritdoc} 72 | */ 73 | public function getVerbosity() 74 | { 75 | return self::VERBOSITY_QUIET; 76 | } 77 | 78 | public function isQuiet() 79 | { 80 | return true; 81 | } 82 | 83 | public function isVerbose() 84 | { 85 | return false; 86 | } 87 | 88 | public function isVeryVerbose() 89 | { 90 | return false; 91 | } 92 | 93 | public function isDebug() 94 | { 95 | return false; 96 | } 97 | 98 | /** 99 | * {@inheritdoc} 100 | */ 101 | public function writeln($messages, $type = self::OUTPUT_NORMAL) 102 | { 103 | // do nothing 104 | } 105 | 106 | /** 107 | * {@inheritdoc} 108 | */ 109 | public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) 110 | { 111 | // do nothing 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Output/OutputInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Output; 13 | 14 | use Symfony\Component\Console\Formatter\OutputFormatterInterface; 15 | 16 | /** 17 | * OutputInterface is the interface implemented by all Output classes. 18 | * 19 | * @author Fabien Potencier 20 | * 21 | * @api 22 | */ 23 | interface OutputInterface 24 | { 25 | const VERBOSITY_QUIET = 0; 26 | const VERBOSITY_NORMAL = 1; 27 | const VERBOSITY_VERBOSE = 2; 28 | const VERBOSITY_VERY_VERBOSE = 3; 29 | const VERBOSITY_DEBUG = 4; 30 | 31 | const OUTPUT_NORMAL = 0; 32 | const OUTPUT_RAW = 1; 33 | const OUTPUT_PLAIN = 2; 34 | 35 | /** 36 | * Writes a message to the output. 37 | * 38 | * @param string|array $messages The message as an array of lines or a single string 39 | * @param bool $newline Whether to add a newline 40 | * @param int $type The type of output (one of the OUTPUT constants) 41 | * 42 | * @throws \InvalidArgumentException When unknown output type is given 43 | * 44 | * @api 45 | */ 46 | public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL); 47 | 48 | /** 49 | * Writes a message to the output and adds a newline at the end. 50 | * 51 | * @param string|array $messages The message as an array of lines of a single string 52 | * @param int $type The type of output (one of the OUTPUT constants) 53 | * 54 | * @throws \InvalidArgumentException When unknown output type is given 55 | * 56 | * @api 57 | */ 58 | public function writeln($messages, $type = self::OUTPUT_NORMAL); 59 | 60 | /** 61 | * Sets the verbosity of the output. 62 | * 63 | * @param int $level The level of verbosity (one of the VERBOSITY constants) 64 | * 65 | * @api 66 | */ 67 | public function setVerbosity($level); 68 | 69 | /** 70 | * Gets the current verbosity of the output. 71 | * 72 | * @return int The current level of verbosity (one of the VERBOSITY constants) 73 | * 74 | * @api 75 | */ 76 | public function getVerbosity(); 77 | 78 | /** 79 | * Sets the decorated flag. 80 | * 81 | * @param bool $decorated Whether to decorate the messages 82 | * 83 | * @api 84 | */ 85 | public function setDecorated($decorated); 86 | 87 | /** 88 | * Gets the decorated flag. 89 | * 90 | * @return bool true if the output will decorate messages, false otherwise 91 | * 92 | * @api 93 | */ 94 | public function isDecorated(); 95 | 96 | /** 97 | * Sets output formatter. 98 | * 99 | * @param OutputFormatterInterface $formatter 100 | * 101 | * @api 102 | */ 103 | public function setFormatter(OutputFormatterInterface $formatter); 104 | 105 | /** 106 | * Returns current output formatter instance. 107 | * 108 | * @return OutputFormatterInterface 109 | * 110 | * @api 111 | */ 112 | public function getFormatter(); 113 | } 114 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Output/StreamOutput.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Output; 13 | 14 | use Symfony\Component\Console\Formatter\OutputFormatterInterface; 15 | 16 | /** 17 | * StreamOutput writes the output to a given stream. 18 | * 19 | * Usage: 20 | * 21 | * $output = new StreamOutput(fopen('php://stdout', 'w')); 22 | * 23 | * As `StreamOutput` can use any stream, you can also use a file: 24 | * 25 | * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false)); 26 | * 27 | * @author Fabien Potencier 28 | * 29 | * @api 30 | */ 31 | class StreamOutput extends Output 32 | { 33 | private $stream; 34 | 35 | /** 36 | * Constructor. 37 | * 38 | * @param mixed $stream A stream resource 39 | * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) 40 | * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) 41 | * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) 42 | * 43 | * @throws \InvalidArgumentException When first argument is not a real stream 44 | * 45 | * @api 46 | */ 47 | public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null) 48 | { 49 | if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) { 50 | throw new \InvalidArgumentException('The StreamOutput class needs a stream as its first argument.'); 51 | } 52 | 53 | $this->stream = $stream; 54 | 55 | if (null === $decorated) { 56 | $decorated = $this->hasColorSupport(); 57 | } 58 | 59 | parent::__construct($verbosity, $decorated, $formatter); 60 | } 61 | 62 | /** 63 | * Gets the stream attached to this StreamOutput instance. 64 | * 65 | * @return resource A stream resource 66 | */ 67 | public function getStream() 68 | { 69 | return $this->stream; 70 | } 71 | 72 | /** 73 | * {@inheritdoc} 74 | */ 75 | protected function doWrite($message, $newline) 76 | { 77 | if (false === @fwrite($this->stream, $message.($newline ? PHP_EOL : ''))) { 78 | // should never happen 79 | throw new \RuntimeException('Unable to write output.'); 80 | } 81 | 82 | fflush($this->stream); 83 | } 84 | 85 | /** 86 | * Returns true if the stream supports colorization. 87 | * 88 | * Colorization is disabled if not supported by the stream: 89 | * 90 | * - Windows without Ansicon and ConEmu 91 | * - non tty consoles 92 | * 93 | * @return bool true if the stream supports colorization, false otherwise 94 | */ 95 | protected function hasColorSupport() 96 | { 97 | if (DIRECTORY_SEPARATOR == '\\') { 98 | return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); 99 | } 100 | 101 | return function_exists('posix_isatty') && @posix_isatty($this->stream); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Question/ConfirmationQuestion.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Question; 13 | 14 | /** 15 | * Represents a yes/no question. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | class ConfirmationQuestion extends Question 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $question The question to ask to the user 25 | * @param bool $default The default answer to return, true or false 26 | */ 27 | public function __construct($question, $default = true) 28 | { 29 | parent::__construct($question, (bool) $default); 30 | 31 | $this->setNormalizer($this->getDefaultNormalizer()); 32 | } 33 | 34 | /** 35 | * Returns the default answer normalizer. 36 | * 37 | * @return callable 38 | */ 39 | private function getDefaultNormalizer() 40 | { 41 | $default = $this->getDefault(); 42 | 43 | return function ($answer) use ($default) { 44 | if (is_bool($answer)) { 45 | return $answer; 46 | } 47 | 48 | if (false === $default) { 49 | return $answer && 'y' === strtolower($answer[0]); 50 | } 51 | 52 | return !$answer || 'y' === strtolower($answer[0]); 53 | }; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/README.md: -------------------------------------------------------------------------------- 1 | Console Component 2 | ================= 3 | 4 | Console eases the creation of beautiful and testable command line interfaces. 5 | 6 | The Application object manages the CLI application: 7 | 8 | ```php 9 | use Symfony\Component\Console\Application; 10 | 11 | $console = new Application(); 12 | $console->run(); 13 | ``` 14 | 15 | The ``run()`` method parses the arguments and options passed on the command 16 | line and executes the right command. 17 | 18 | Registering a new command can easily be done via the ``register()`` method, 19 | which returns a ``Command`` instance: 20 | 21 | ```php 22 | use Symfony\Component\Console\Input\InputInterface; 23 | use Symfony\Component\Console\Input\InputArgument; 24 | use Symfony\Component\Console\Input\InputOption; 25 | use Symfony\Component\Console\Output\OutputInterface; 26 | 27 | $console 28 | ->register('ls') 29 | ->setDefinition(array( 30 | new InputArgument('dir', InputArgument::REQUIRED, 'Directory name'), 31 | )) 32 | ->setDescription('Displays the files in the given directory') 33 | ->setCode(function (InputInterface $input, OutputInterface $output) { 34 | $dir = $input->getArgument('dir'); 35 | 36 | $output->writeln(sprintf('Dir listing for %s', $dir)); 37 | }) 38 | ; 39 | ``` 40 | 41 | You can also register new commands via classes. 42 | 43 | The component provides a lot of features like output coloring, input and 44 | output abstractions (so that you can easily unit-test your commands), 45 | validation, automatic help messages, ... 46 | 47 | Tests 48 | ----- 49 | 50 | You can run the unit tests with the following command: 51 | 52 | $ cd path/to/Symfony/Component/Console/ 53 | $ composer install 54 | $ phpunit 55 | 56 | Third Party 57 | ----------- 58 | 59 | `Resources/bin/hiddeninput.exe` is a third party binary provided within this 60 | component. Find sources and license at https://github.com/Seldaek/hidden-input. 61 | 62 | Resources 63 | --------- 64 | 65 | [The Console Component](https://symfony.com/doc/current/components/console.html) 66 | 67 | [How to create a Console Command](https://symfony.com/doc/current/cookbook/console/console_command.html) 68 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Resources/bin/hiddeninput.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/vendor/symfony/console/Symfony/Component/Console/Resources/bin/hiddeninput.exe -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Command/HelpCommandTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Command; 13 | 14 | use Symfony\Component\Console\Tester\CommandTester; 15 | use Symfony\Component\Console\Command\HelpCommand; 16 | use Symfony\Component\Console\Command\ListCommand; 17 | use Symfony\Component\Console\Application; 18 | 19 | class HelpCommandTest extends \PHPUnit_Framework_TestCase 20 | { 21 | public function testExecuteForCommandAlias() 22 | { 23 | $command = new HelpCommand(); 24 | $command->setApplication(new Application()); 25 | $commandTester = new CommandTester($command); 26 | $commandTester->execute(array('command_name' => 'li')); 27 | $this->assertRegExp('/list \[--xml\] \[--raw\] \[--format="\.\.\."\] \[namespace\]/', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); 28 | } 29 | 30 | public function testExecuteForCommand() 31 | { 32 | $command = new HelpCommand(); 33 | $commandTester = new CommandTester($command); 34 | $command->setCommand(new ListCommand()); 35 | $commandTester->execute(array()); 36 | $this->assertRegExp('/list \[--xml\] \[--raw\] \[--format="\.\.\."\] \[namespace\]/', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); 37 | } 38 | 39 | public function testExecuteForCommandWithXmlOption() 40 | { 41 | $command = new HelpCommand(); 42 | $commandTester = new CommandTester($command); 43 | $command->setCommand(new ListCommand()); 44 | $commandTester->execute(array('--format' => 'xml')); 45 | $this->assertRegExp('/getDisplay(), '->execute() returns an XML help text if --xml is passed'); 46 | } 47 | 48 | public function testExecuteForApplicationCommand() 49 | { 50 | $application = new Application(); 51 | $commandTester = new CommandTester($application->get('help')); 52 | $commandTester->execute(array('command_name' => 'list')); 53 | $this->assertRegExp('/list \[--xml\] \[--raw\] \[--format="\.\.\."\] \[namespace\]/', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); 54 | } 55 | 56 | public function testExecuteForApplicationCommandWithXmlOption() 57 | { 58 | $application = new Application(); 59 | $commandTester = new CommandTester($application->get('help')); 60 | $commandTester->execute(array('command_name' => 'list', '--format' => 'xml')); 61 | $this->assertRegExp('/list \[--xml\] \[--raw\] \[--format="\.\.\."\] \[namespace\]/', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); 62 | $this->assertRegExp('/getDisplay(), '->execute() returns an XML help text if --format=xml is passed'); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Command/ListCommandTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Command; 13 | 14 | use Symfony\Component\Console\Tester\CommandTester; 15 | use Symfony\Component\Console\Application; 16 | 17 | class ListCommandTest extends \PHPUnit_Framework_TestCase 18 | { 19 | public function testExecuteListsCommands() 20 | { 21 | $application = new Application(); 22 | $commandTester = new CommandTester($command = $application->get('list')); 23 | $commandTester->execute(array('command' => $command->getName()), array('decorated' => false)); 24 | 25 | $this->assertRegExp('/help Displays help for a command/', $commandTester->getDisplay(), '->execute() returns a list of available commands'); 26 | } 27 | 28 | public function testExecuteListsCommandsWithXmlOption() 29 | { 30 | $application = new Application(); 31 | $commandTester = new CommandTester($command = $application->get('list')); 32 | $commandTester->execute(array('command' => $command->getName(), '--format' => 'xml')); 33 | $this->assertRegExp('//', $commandTester->getDisplay(), '->execute() returns a list of available commands in XML if --xml is passed'); 34 | } 35 | 36 | public function testExecuteListsCommandsWithRawOption() 37 | { 38 | $application = new Application(); 39 | $commandTester = new CommandTester($command = $application->get('list')); 40 | $commandTester->execute(array('command' => $command->getName(), '--raw' => true)); 41 | $output = <<assertEquals($output, $commandTester->getDisplay(true)); 48 | } 49 | 50 | public function testExecuteListsCommandsWithNamespaceArgument() 51 | { 52 | require_once realpath(__DIR__.'/../Fixtures/FooCommand.php'); 53 | $application = new Application(); 54 | $application->add(new \FooCommand()); 55 | $commandTester = new CommandTester($command = $application->get('list')); 56 | $commandTester->execute(array('command' => $command->getName(), 'namespace' => 'foo', '--raw' => true)); 57 | $output = <<assertEquals($output, $commandTester->getDisplay(true)); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/JsonDescriptorTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Descriptor; 13 | 14 | use Symfony\Component\Console\Descriptor\JsonDescriptor; 15 | 16 | class JsonDescriptorTest extends AbstractDescriptorTest 17 | { 18 | protected function getDescriptor() 19 | { 20 | return new JsonDescriptor(); 21 | } 22 | 23 | protected function getFormat() 24 | { 25 | return 'json'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/MarkdownDescriptorTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Descriptor; 13 | 14 | use Symfony\Component\Console\Descriptor\MarkdownDescriptor; 15 | 16 | class MarkdownDescriptorTest extends AbstractDescriptorTest 17 | { 18 | protected function getDescriptor() 19 | { 20 | return new MarkdownDescriptor(); 21 | } 22 | 23 | protected function getFormat() 24 | { 25 | return 'md'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Descriptor; 13 | 14 | use Symfony\Component\Console\Input\InputArgument; 15 | use Symfony\Component\Console\Input\InputDefinition; 16 | use Symfony\Component\Console\Input\InputOption; 17 | use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication1; 18 | use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication2; 19 | use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand1; 20 | use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand2; 21 | 22 | /** 23 | * @author Jean-François Simon 24 | */ 25 | class ObjectsProvider 26 | { 27 | public static function getInputArguments() 28 | { 29 | return array( 30 | 'input_argument_1' => new InputArgument('argument_name', InputArgument::REQUIRED), 31 | 'input_argument_2' => new InputArgument('argument_name', InputArgument::IS_ARRAY, 'argument description'), 32 | 'input_argument_3' => new InputArgument('argument_name', InputArgument::OPTIONAL, 'argument description', 'default_value'), 33 | ); 34 | } 35 | 36 | public static function getInputOptions() 37 | { 38 | return array( 39 | 'input_option_1' => new InputOption('option_name', 'o', InputOption::VALUE_NONE), 40 | 'input_option_2' => new InputOption('option_name', 'o', InputOption::VALUE_OPTIONAL, 'option description', 'default_value'), 41 | 'input_option_3' => new InputOption('option_name', 'o', InputOption::VALUE_REQUIRED, 'option description'), 42 | 'input_option_4' => new InputOption('option_name', 'o', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'option description', array()), 43 | ); 44 | } 45 | 46 | public static function getInputDefinitions() 47 | { 48 | return array( 49 | 'input_definition_1' => new InputDefinition(), 50 | 'input_definition_2' => new InputDefinition(array(new InputArgument('argument_name', InputArgument::REQUIRED))), 51 | 'input_definition_3' => new InputDefinition(array(new InputOption('option_name', 'o', InputOption::VALUE_NONE))), 52 | 'input_definition_4' => new InputDefinition(array( 53 | new InputArgument('argument_name', InputArgument::REQUIRED), 54 | new InputOption('option_name', 'o', InputOption::VALUE_NONE), 55 | )), 56 | ); 57 | } 58 | 59 | public static function getCommands() 60 | { 61 | return array( 62 | 'command_1' => new DescriptorCommand1(), 63 | 'command_2' => new DescriptorCommand2(), 64 | ); 65 | } 66 | 67 | public static function getApplications() 68 | { 69 | return array( 70 | 'application_1' => new DescriptorApplication1(), 71 | 'application_2' => new DescriptorApplication2(), 72 | ); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/TextDescriptorTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Descriptor; 13 | 14 | use Symfony\Component\Console\Descriptor\TextDescriptor; 15 | 16 | class TextDescriptorTest extends AbstractDescriptorTest 17 | { 18 | protected function getDescriptor() 19 | { 20 | return new TextDescriptor(); 21 | } 22 | 23 | protected function getFormat() 24 | { 25 | return 'txt'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/XmlDescriptorTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Descriptor; 13 | 14 | use Symfony\Component\Console\Descriptor\XmlDescriptor; 15 | 16 | class XmlDescriptorTest extends AbstractDescriptorTest 17 | { 18 | protected function getDescriptor() 19 | { 20 | return new XmlDescriptor(); 21 | } 22 | 23 | protected function getFormat() 24 | { 25 | return 'xml'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/BarBucCommand.php: -------------------------------------------------------------------------------- 1 | setName('bar:buc'); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication1.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Fixtures; 13 | 14 | use Symfony\Component\Console\Application; 15 | 16 | class DescriptorApplication1 extends Application 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Fixtures; 13 | 14 | use Symfony\Component\Console\Application; 15 | 16 | class DescriptorApplication2 extends Application 17 | { 18 | public function __construct() 19 | { 20 | parent::__construct('My Symfony application', 'v1.0'); 21 | $this->add(new DescriptorCommand1()); 22 | $this->add(new DescriptorCommand2()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Fixtures; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | 16 | class DescriptorCommand1 extends Command 17 | { 18 | protected function configure() 19 | { 20 | $this 21 | ->setName('descriptor:command1') 22 | ->setAliases(array('alias1', 'alias2')) 23 | ->setDescription('command 1 description') 24 | ->setHelp('command 1 help') 25 | ; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Fixtures; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | use Symfony\Component\Console\Input\InputArgument; 16 | use Symfony\Component\Console\Input\InputOption; 17 | 18 | class DescriptorCommand2 extends Command 19 | { 20 | protected function configure() 21 | { 22 | $this 23 | ->setName('descriptor:command2') 24 | ->setDescription('command 2 description') 25 | ->setHelp('command 2 help') 26 | ->addArgument('argument_name', InputArgument::REQUIRED) 27 | ->addOption('option_name', 'o', InputOption::VALUE_NONE) 28 | ; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Fixtures; 13 | 14 | use Symfony\Component\Console\Output\BufferedOutput; 15 | 16 | /** 17 | * Dummy output 18 | * 19 | * @author Kévin Dunglas 20 | */ 21 | class DummyOutput extends BufferedOutput 22 | { 23 | /** 24 | * @return array 25 | */ 26 | public function getLogs() 27 | { 28 | $logs = array(); 29 | foreach (explode("\n", trim($this->fetch())) as $message) { 30 | preg_match('/^\[(.*)\] (.*)/', $message, $matches); 31 | $logs[] = sprintf('%s %s', $matches[1], $matches[2]); 32 | } 33 | 34 | return $logs; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo1Command.php: -------------------------------------------------------------------------------- 1 | setName('foo:bar1') 16 | ->setDescription('The foo:bar1 command') 17 | ->setAliases(array('afoobar1')) 18 | ; 19 | } 20 | 21 | protected function execute(InputInterface $input, OutputInterface $output) 22 | { 23 | $this->input = $input; 24 | $this->output = $output; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo2Command.php: -------------------------------------------------------------------------------- 1 | setName('foo1:bar') 13 | ->setDescription('The foo1:bar command') 14 | ->setAliases(array('afoobar2')) 15 | ; 16 | } 17 | 18 | protected function execute(InputInterface $input, OutputInterface $output) 19 | { 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo3Command.php: -------------------------------------------------------------------------------- 1 | setName('foo3:bar') 13 | ->setDescription('The foo3:bar command') 14 | ; 15 | } 16 | 17 | protected function execute(InputInterface $input, OutputInterface $output) 18 | { 19 | try { 20 | try { 21 | throw new \Exception('First exception

this is html

'); 22 | } catch (\Exception $e) { 23 | throw new \Exception('Second exception comment', 0, $e); 24 | } 25 | } catch (\Exception $e) { 26 | throw new \Exception('Third exception comment', 0, $e); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php: -------------------------------------------------------------------------------- 1 | setName('foo3:bar:toh'); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo5Command.php: -------------------------------------------------------------------------------- 1 | setName('foo:bar') 16 | ->setDescription('The foo:bar command') 17 | ->setAliases(array('afoobar')) 18 | ; 19 | } 20 | 21 | protected function interact(InputInterface $input, OutputInterface $output) 22 | { 23 | $output->writeln('interact called'); 24 | } 25 | 26 | protected function execute(InputInterface $input, OutputInterface $output) 27 | { 28 | $this->input = $input; 29 | $this->output = $output; 30 | 31 | $output->writeln('called'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced1Command.php: -------------------------------------------------------------------------------- 1 | setName('foo:bar:baz') 16 | ->setDescription('The foo:bar:baz command') 17 | ->setAliases(array('foobarbaz')) 18 | ; 19 | } 20 | 21 | protected function execute(InputInterface $input, OutputInterface $output) 22 | { 23 | $this->input = $input; 24 | $this->output = $output; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced2Command.php: -------------------------------------------------------------------------------- 1 | setName('foo:go:bret') 16 | ->setDescription('The foo:bar:go command') 17 | ->setAliases(array('foobargo')) 18 | ; 19 | } 20 | 21 | protected function execute(InputInterface $input, OutputInterface $output) 22 | { 23 | $this->input = $input; 24 | $this->output = $output; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FoobarCommand.php: -------------------------------------------------------------------------------- 1 | setName('foobar:foo') 16 | ->setDescription('The foobar:foo command') 17 | ; 18 | } 19 | 20 | protected function execute(InputInterface $input, OutputInterface $output) 21 | { 22 | $this->input = $input; 23 | $this->output = $output; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/TestCommand.php: -------------------------------------------------------------------------------- 1 | setName('namespace:name') 13 | ->setAliases(array('name')) 14 | ->setDescription('description') 15 | ->setHelp('help') 16 | ; 17 | } 18 | 19 | protected function execute(InputInterface $input, OutputInterface $output) 20 | { 21 | $output->writeln('execute called'); 22 | } 23 | 24 | protected function interact(InputInterface $input, OutputInterface $output) 25 | { 26 | $output->writeln('interact called'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.txt: -------------------------------------------------------------------------------- 1 | Console Tool 2 | 3 | Usage: 4 | command [options] [arguments] 5 | 6 | Options: 7 | --help (-h) Display this help message 8 | --quiet (-q) Do not output any message 9 | --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug 10 | --version (-V) Display this application version 11 | --ansi Force ANSI output 12 | --no-ansi Disable ANSI output 13 | --no-interaction (-n) Do not ask any interactive question 14 | 15 | Available commands: 16 | help Displays help for a command 17 | list Lists commands 18 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.txt: -------------------------------------------------------------------------------- 1 | My Symfony application version v1.0 2 | 3 | Usage: 4 | command [options] [arguments] 5 | 6 | Options: 7 | --help (-h) Display this help message 8 | --quiet (-q) Do not output any message 9 | --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug 10 | --version (-V) Display this application version 11 | --ansi Force ANSI output 12 | --no-ansi Disable ANSI output 13 | --no-interaction (-n) Do not ask any interactive question 14 | 15 | Available commands: 16 | alias1 command 1 description 17 | alias2 command 1 description 18 | help Displays help for a command 19 | list Lists commands 20 | descriptor 21 | descriptor:command1 command 1 description 22 | descriptor:command2 command 2 description 23 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_astext1.txt: -------------------------------------------------------------------------------- 1 | Console Tool 2 | 3 | Usage: 4 | command [options] [arguments] 5 | 6 | Options: 7 | --help (-h) Display this help message 8 | --quiet (-q) Do not output any message 9 | --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug 10 | --version (-V) Display this application version 11 | --ansi Force ANSI output 12 | --no-ansi Disable ANSI output 13 | --no-interaction (-n) Do not ask any interactive question 14 | 15 | Available commands: 16 | afoobar The foo:bar command 17 | help Displays help for a command 18 | list Lists commands 19 | foo 20 | foo:bar The foo:bar command 21 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_astext2.txt: -------------------------------------------------------------------------------- 1 | Console Tool 2 | 3 | Usage: 4 | command [options] [arguments] 5 | 6 | Options: 7 | --help (-h) Display this help message 8 | --quiet (-q) Do not output any message 9 | --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug 10 | --version (-V) Display this application version 11 | --ansi Force ANSI output 12 | --no-ansi Disable ANSI output 13 | --no-interaction (-n) Do not ask any interactive question 14 | 15 | Available commands for the "foo" namespace: 16 | foo:bar The foo:bar command 17 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | foo:bar 6 | The foo:bar command 7 | 8 | 9 | afoobar 10 | 11 | 12 | 13 | 16 | 19 | 22 | 25 | 28 | 31 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_gethelp.txt: -------------------------------------------------------------------------------- 1 | Console Tool -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception1.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [InvalidArgumentException] 5 | Command "foo" is not defined. 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception2.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [InvalidArgumentException] 5 | The "--foo" option does not exist. 6 | 7 | 8 | 9 | list [--xml] [--raw] [--format="..."] [namespace] 10 | 11 | 12 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [Exception] 5 | Third exception comment 6 | 7 | 8 | 9 | 10 | 11 | 12 | [Exception] 13 | Second exception comment 14 | 15 | 16 | 17 | 18 | 19 | 20 | [Exception] 21 | First exception

this is html

22 | 23 | 24 | 25 | foo3:bar 26 | 27 | 28 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 |   4 |  [Exception]  5 |  Third exception comment  6 |   7 | 8 | 9 | 10 | 11 |   12 |  [Exception]  13 |  Second exception comment  14 |   15 | 16 | 17 | 18 | 19 |   20 |  [Exception]  21 |  First exception 

this is html

  22 |   23 | 24 | 25 | foo3:bar 26 | 27 | 28 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception4.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [InvalidArgumentException] 5 | Command "foo" is not define 6 | d. 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [Exception] 5 | エラーメッセージ 6 | 7 | 8 | 9 | foo 10 | 11 | 12 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 |   4 |  [Exception]  5 |  エラーメッセージ  6 |   7 | 8 | 9 | foo 10 | 11 | 12 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [Exception] 5 | コマンドの実行中にエラーが 6 | 発生しました。 7 | 8 | 9 | 10 | foo 11 | 12 | 13 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run1.txt: -------------------------------------------------------------------------------- 1 | Console Tool 2 | 3 | Usage: 4 | command [options] [arguments] 5 | 6 | Options: 7 | --help (-h) Display this help message 8 | --quiet (-q) Do not output any message 9 | --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug 10 | --version (-V) Display this application version 11 | --ansi Force ANSI output 12 | --no-ansi Disable ANSI output 13 | --no-interaction (-n) Do not ask any interactive question 14 | 15 | Available commands: 16 | help Displays help for a command 17 | list Lists commands 18 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run2.txt: -------------------------------------------------------------------------------- 1 | Usage: 2 | help [--xml] [--format="..."] [--raw] [command_name] 3 | 4 | Arguments: 5 | command The command to execute 6 | command_name The command name (default: "help") 7 | 8 | Options: 9 | --xml To output help as XML 10 | --format To output help in other formats (default: "txt") 11 | --raw To output raw command help 12 | --help (-h) Display this help message 13 | --quiet (-q) Do not output any message 14 | --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug 15 | --version (-V) Display this application version 16 | --ansi Force ANSI output 17 | --no-ansi Disable ANSI output 18 | --no-interaction (-n) Do not ask any interactive question 19 | 20 | Help: 21 | The help command displays help for a given command: 22 | 23 | php app/console help list 24 | 25 | You can also output the help in other formats by using the --format option: 26 | 27 | php app/console help --format=xml list 28 | 29 | To display the list of available commands, please use the list command. 30 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run3.txt: -------------------------------------------------------------------------------- 1 | Usage: 2 | list [--xml] [--raw] [--format="..."] [namespace] 3 | 4 | Arguments: 5 | namespace The namespace name 6 | 7 | Options: 8 | --xml To output list as XML 9 | --raw To output raw command list 10 | --format To output list in other formats (default: "txt") 11 | 12 | Help: 13 | The list command lists all commands: 14 | 15 | php app/console list 16 | 17 | You can also display the commands for a specific namespace: 18 | 19 | php app/console list test 20 | 21 | You can also output the information in other formats by using the --format option: 22 | 23 | php app/console list --format=xml 24 | 25 | It's also possible to get raw list of commands (useful for embedding command runner): 26 | 27 | php app/console list --raw 28 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run4.txt: -------------------------------------------------------------------------------- 1 | Console Tool 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.json: -------------------------------------------------------------------------------- 1 | {"name":"descriptor:command1","usage":"descriptor:command1","description":"command 1 description","help":"command 1 help","aliases":["alias1","alias2"],"definition":{"arguments":[],"options":[]}} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.md: -------------------------------------------------------------------------------- 1 | descriptor:command1 2 | ------------------- 3 | 4 | * Description: command 1 description 5 | * Usage: `descriptor:command1` 6 | * Aliases: `alias1`, `alias2` 7 | 8 | command 1 help 9 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.txt: -------------------------------------------------------------------------------- 1 | Usage: 2 | descriptor:command1 3 | 4 | Aliases: alias1, alias2 5 | 6 | Help: 7 | command 1 help 8 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | descriptor:command1 4 | command 1 description 5 | command 1 help 6 | 7 | alias1 8 | alias2 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.json: -------------------------------------------------------------------------------- 1 | {"name":"descriptor:command2","usage":"descriptor:command2 [-o|--option_name] argument_name","description":"command 2 description","help":"command 2 help","aliases":[],"definition":{"arguments":{"argument_name":{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null}},"options":{"option_name":{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false}}}} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.md: -------------------------------------------------------------------------------- 1 | descriptor:command2 2 | ------------------- 3 | 4 | * Description: command 2 description 5 | * Usage: `descriptor:command2 [-o|--option_name] argument_name` 6 | * Aliases: 7 | 8 | command 2 help 9 | 10 | ### Arguments: 11 | 12 | **argument_name:** 13 | 14 | * Name: argument_name 15 | * Is required: yes 16 | * Is array: no 17 | * Description: 18 | * Default: `NULL` 19 | 20 | ### Options: 21 | 22 | **option_name:** 23 | 24 | * Name: `--option_name` 25 | * Shortcut: `-o` 26 | * Accept value: no 27 | * Is value required: no 28 | * Is multiple: no 29 | * Description: 30 | * Default: `false` 31 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.txt: -------------------------------------------------------------------------------- 1 | Usage: 2 | descriptor:command2 [-o|--option_name] argument_name 3 | 4 | Arguments: 5 | argument_name 6 | 7 | Options: 8 | --option_name (-o) 9 | 10 | Help: 11 | command 2 help 12 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | descriptor:command2 [-o|--option_name] argument_name 4 | command 2 description 5 | command 2 help 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_astext.txt: -------------------------------------------------------------------------------- 1 | Usage: 2 | namespace:name 3 | 4 | Aliases: name 5 | Arguments: 6 | command The command to execute 7 | 8 | Options: 9 | --help (-h) Display this help message 10 | --quiet (-q) Do not output any message 11 | --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug 12 | --version (-V) Display this application version 13 | --ansi Force ANSI output 14 | --no-ansi Disable ANSI output 15 | --no-interaction (-n) Do not ask any interactive question 16 | 17 | Help: 18 | help 19 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_asxml.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | namespace:name 4 | description 5 | help 6 | 7 | name 8 | 9 | 10 | 11 | The command to execute 12 | 13 | 14 | 15 | 16 | 19 | 22 | 25 | 28 | 31 | 34 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/definition_astext.txt: -------------------------------------------------------------------------------- 1 | Arguments: 2 | foo The foo argument 3 | baz The baz argument (default: true) 4 | bar The bar argument (default: ["http://foo.com/"]) 5 | 6 | Options: 7 | --foo (-f) The foo option 8 | --baz The baz option (default: false) 9 | --bar (-b) The bar option (default: "bar") 10 | --qux The qux option (default: ["http://foo.com/","bar"]) (multiple values allowed) 11 | --qux2 The qux2 option (default: {"foo":"bar"}) (multiple values allowed) 12 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/definition_asxml.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | The foo argument 6 | 7 | 8 | 9 | The baz argument 10 | 11 | true 12 | 13 | 14 | 15 | The bar argument 16 | 17 | bar 18 | 19 | 20 | 21 | 22 | 26 | 32 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.json: -------------------------------------------------------------------------------- 1 | {"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.md: -------------------------------------------------------------------------------- 1 | **argument_name:** 2 | 3 | * Name: argument_name 4 | * Is required: yes 5 | * Is array: no 6 | * Description: 7 | * Default: `NULL` 8 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.txt: -------------------------------------------------------------------------------- 1 | argument_name 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.json: -------------------------------------------------------------------------------- 1 | {"name":"argument_name","is_required":false,"is_array":true,"description":"argument description","default":[]} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.md: -------------------------------------------------------------------------------- 1 | **argument_name:** 2 | 3 | * Name: argument_name 4 | * Is required: no 5 | * Is array: yes 6 | * Description: argument description 7 | * Default: `array ()` 8 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.txt: -------------------------------------------------------------------------------- 1 | argument_name argument description 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | argument description 4 | 5 | 6 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.json: -------------------------------------------------------------------------------- 1 | {"name":"argument_name","is_required":false,"is_array":false,"description":"argument description","default":"default_value"} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.md: -------------------------------------------------------------------------------- 1 | **argument_name:** 2 | 3 | * Name: argument_name 4 | * Is required: no 5 | * Is array: no 6 | * Description: argument description 7 | * Default: `'default_value'` 8 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.txt: -------------------------------------------------------------------------------- 1 | argument_name argument description (default: "default_value") 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | argument description 4 | 5 | default_value 6 | 7 | 8 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.json: -------------------------------------------------------------------------------- 1 | {"arguments":[],"options":[]} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.md -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielMabadeje/Start-My-Simple-PHP-Framework/db4e4840be400f6c2b8cf1416d62c9a4a8b651b9/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.txt -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.json: -------------------------------------------------------------------------------- 1 | {"arguments":{"argument_name":{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null}},"options":[]} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.md: -------------------------------------------------------------------------------- 1 | ### Arguments: 2 | 3 | **argument_name:** 4 | 5 | * Name: argument_name 6 | * Is required: yes 7 | * Is array: no 8 | * Description: 9 | * Default: `NULL` 10 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.txt: -------------------------------------------------------------------------------- 1 | Arguments: 2 | argument_name 3 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.json: -------------------------------------------------------------------------------- 1 | {"arguments":[],"options":{"option_name":{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false}}} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.md: -------------------------------------------------------------------------------- 1 | ### Options: 2 | 3 | **option_name:** 4 | 5 | * Name: `--option_name` 6 | * Shortcut: `-o` 7 | * Accept value: no 8 | * Is value required: no 9 | * Is multiple: no 10 | * Description: 11 | * Default: `false` 12 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.txt: -------------------------------------------------------------------------------- 1 | Options: 2 | --option_name (-o) 3 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.json: -------------------------------------------------------------------------------- 1 | {"arguments":{"argument_name":{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null}},"options":{"option_name":{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false}}} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.md: -------------------------------------------------------------------------------- 1 | ### Arguments: 2 | 3 | **argument_name:** 4 | 5 | * Name: argument_name 6 | * Is required: yes 7 | * Is array: no 8 | * Description: 9 | * Default: `NULL` 10 | 11 | ### Options: 12 | 13 | **option_name:** 14 | 15 | * Name: `--option_name` 16 | * Shortcut: `-o` 17 | * Accept value: no 18 | * Is value required: no 19 | * Is multiple: no 20 | * Description: 21 | * Default: `false` 22 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.txt: -------------------------------------------------------------------------------- 1 | Arguments: 2 | argument_name 3 | 4 | Options: 5 | --option_name (-o) 6 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.json: -------------------------------------------------------------------------------- 1 | {"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.md: -------------------------------------------------------------------------------- 1 | **option_name:** 2 | 3 | * Name: `--option_name` 4 | * Shortcut: `-o` 5 | * Accept value: no 6 | * Is value required: no 7 | * Is multiple: no 8 | * Description: 9 | * Default: `false` 10 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.txt: -------------------------------------------------------------------------------- 1 | --option_name (-o) 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.json: -------------------------------------------------------------------------------- 1 | {"name":"--option_name","shortcut":"-o","accept_value":true,"is_value_required":false,"is_multiple":false,"description":"option description","default":"default_value"} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.md: -------------------------------------------------------------------------------- 1 | **option_name:** 2 | 3 | * Name: `--option_name` 4 | * Shortcut: `-o` 5 | * Accept value: yes 6 | * Is value required: no 7 | * Is multiple: no 8 | * Description: option description 9 | * Default: `'default_value'` 10 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.txt: -------------------------------------------------------------------------------- 1 | --option_name (-o) option description (default: "default_value") 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.json: -------------------------------------------------------------------------------- 1 | {"name":"--option_name","shortcut":"-o","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"option description","default":null} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.md: -------------------------------------------------------------------------------- 1 | **option_name:** 2 | 3 | * Name: `--option_name` 4 | * Shortcut: `-o` 5 | * Accept value: yes 6 | * Is value required: yes 7 | * Is multiple: no 8 | * Description: option description 9 | * Default: `NULL` 10 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.txt: -------------------------------------------------------------------------------- 1 | --option_name (-o) option description 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.json: -------------------------------------------------------------------------------- 1 | {"name":"--option_name","shortcut":"-o","accept_value":true,"is_value_required":false,"is_multiple":true,"description":"option description","default":[]} 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.md: -------------------------------------------------------------------------------- 1 | **option_name:** 2 | 3 | * Name: `--option_name` 4 | * Shortcut: `-o` 5 | * Accept value: yes 6 | * Is value required: no 7 | * Is multiple: yes 8 | * Description: option description 9 | * Default: `array ()` 10 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.txt: -------------------------------------------------------------------------------- 1 | --option_name (-o) option description (multiple values allowed) 2 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Formatter; 13 | 14 | use Symfony\Component\Console\Formatter\OutputFormatterStyleStack; 15 | use Symfony\Component\Console\Formatter\OutputFormatterStyle; 16 | 17 | class OutputFormatterStyleStackTest extends \PHPUnit_Framework_TestCase 18 | { 19 | public function testPush() 20 | { 21 | $stack = new OutputFormatterStyleStack(); 22 | $stack->push($s1 = new OutputFormatterStyle('white', 'black')); 23 | $stack->push($s2 = new OutputFormatterStyle('yellow', 'blue')); 24 | 25 | $this->assertEquals($s2, $stack->getCurrent()); 26 | 27 | $stack->push($s3 = new OutputFormatterStyle('green', 'red')); 28 | 29 | $this->assertEquals($s3, $stack->getCurrent()); 30 | } 31 | 32 | public function testPop() 33 | { 34 | $stack = new OutputFormatterStyleStack(); 35 | $stack->push($s1 = new OutputFormatterStyle('white', 'black')); 36 | $stack->push($s2 = new OutputFormatterStyle('yellow', 'blue')); 37 | 38 | $this->assertEquals($s2, $stack->pop()); 39 | $this->assertEquals($s1, $stack->pop()); 40 | } 41 | 42 | public function testPopEmpty() 43 | { 44 | $stack = new OutputFormatterStyleStack(); 45 | $style = new OutputFormatterStyle(); 46 | 47 | $this->assertEquals($style, $stack->pop()); 48 | } 49 | 50 | public function testPopNotLast() 51 | { 52 | $stack = new OutputFormatterStyleStack(); 53 | $stack->push($s1 = new OutputFormatterStyle('white', 'black')); 54 | $stack->push($s2 = new OutputFormatterStyle('yellow', 'blue')); 55 | $stack->push($s3 = new OutputFormatterStyle('green', 'red')); 56 | 57 | $this->assertEquals($s2, $stack->pop($s2)); 58 | $this->assertEquals($s1, $stack->pop()); 59 | } 60 | 61 | /** 62 | * @expectedException \InvalidArgumentException 63 | */ 64 | public function testInvalidPop() 65 | { 66 | $stack = new OutputFormatterStyleStack(); 67 | $stack->push(new OutputFormatterStyle('white', 'black')); 68 | $stack->pop(new OutputFormatterStyle('yellow', 'blue')); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Logger; 13 | 14 | use Psr\Log\Test\LoggerInterfaceTest; 15 | use Psr\Log\LogLevel; 16 | use Symfony\Component\Console\Logger\ConsoleLogger; 17 | use Symfony\Component\Console\Tests\Fixtures\DummyOutput; 18 | use Symfony\Component\Console\Output\OutputInterface; 19 | 20 | /** 21 | * Console logger test 22 | * 23 | * @author Kévin Dunglas 24 | */ 25 | class ConsoleLoggerTest extends LoggerInterfaceTest 26 | { 27 | /** 28 | * @var DummyOutput 29 | */ 30 | protected $output; 31 | 32 | /** 33 | * {@inheritdoc} 34 | */ 35 | public function getLogger() 36 | { 37 | $this->output = new DummyOutput(OutputInterface::VERBOSITY_VERBOSE); 38 | 39 | return new ConsoleLogger($this->output, array( 40 | LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, 41 | LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, 42 | LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, 43 | LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL, 44 | LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL, 45 | LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL, 46 | LogLevel::INFO => OutputInterface::VERBOSITY_NORMAL, 47 | LogLevel::DEBUG => OutputInterface::VERBOSITY_NORMAL, 48 | )); 49 | } 50 | 51 | /** 52 | * {@inheritdoc} 53 | */ 54 | public function getLogs() 55 | { 56 | return $this->output->getLogs(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Output/ConsoleOutputTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Output; 13 | 14 | use Symfony\Component\Console\Output\ConsoleOutput; 15 | use Symfony\Component\Console\Output\Output; 16 | 17 | class ConsoleOutputTest extends \PHPUnit_Framework_TestCase 18 | { 19 | public function testConstructor() 20 | { 21 | $output = new ConsoleOutput(Output::VERBOSITY_QUIET, true); 22 | $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '__construct() takes the verbosity as its first argument'); 23 | $this->assertSame($output->getFormatter(), $output->getErrorOutput()->getFormatter(), '__construct() takes a formatter or null as the third argument'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Output/NullOutputTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Output; 13 | 14 | use Symfony\Component\Console\Output\NullOutput; 15 | use Symfony\Component\Console\Output\OutputInterface; 16 | 17 | class NullOutputTest extends \PHPUnit_Framework_TestCase 18 | { 19 | public function testConstructor() 20 | { 21 | $output = new NullOutput(); 22 | 23 | ob_start(); 24 | $output->write('foo'); 25 | $buffer = ob_get_clean(); 26 | 27 | $this->assertSame('', $buffer, '->write() does nothing (at least nothing is printed)'); 28 | $this->assertFalse($output->isDecorated(), '->isDecorated() returns false'); 29 | } 30 | 31 | public function testVerbosity() 32 | { 33 | $output = new NullOutput(); 34 | $this->assertSame(OutputInterface::VERBOSITY_QUIET, $output->getVerbosity(), '->getVerbosity() returns VERBOSITY_QUIET for NullOutput by default'); 35 | 36 | $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); 37 | $this->assertSame(OutputInterface::VERBOSITY_QUIET, $output->getVerbosity(), '->getVerbosity() always returns VERBOSITY_QUIET for NullOutput'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Output/StreamOutputTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Output; 13 | 14 | use Symfony\Component\Console\Output\Output; 15 | use Symfony\Component\Console\Output\StreamOutput; 16 | 17 | class StreamOutputTest extends \PHPUnit_Framework_TestCase 18 | { 19 | protected $stream; 20 | 21 | protected function setUp() 22 | { 23 | $this->stream = fopen('php://memory', 'a', false); 24 | } 25 | 26 | protected function tearDown() 27 | { 28 | $this->stream = null; 29 | } 30 | 31 | public function testConstructor() 32 | { 33 | $output = new StreamOutput($this->stream, Output::VERBOSITY_QUIET, true); 34 | $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '__construct() takes the verbosity as its first argument'); 35 | $this->assertTrue($output->isDecorated(), '__construct() takes the decorated flag as its second argument'); 36 | } 37 | 38 | /** 39 | * @expectedException \InvalidArgumentException 40 | * @expectedExceptionMessage The StreamOutput class needs a stream as its first argument. 41 | */ 42 | public function testStreamIsRequired() 43 | { 44 | new StreamOutput('foo'); 45 | } 46 | 47 | public function testGetStream() 48 | { 49 | $output = new StreamOutput($this->stream); 50 | $this->assertEquals($this->stream, $output->getStream(), '->getStream() returns the current stream'); 51 | } 52 | 53 | public function testDoWrite() 54 | { 55 | $output = new StreamOutput($this->stream); 56 | $output->writeln('foo'); 57 | rewind($output->getStream()); 58 | $this->assertEquals('foo'.PHP_EOL, stream_get_contents($output->getStream()), '->doWrite() writes to the stream'); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Tester; 13 | 14 | use Symfony\Component\Console\Application; 15 | use Symfony\Component\Console\Output\Output; 16 | use Symfony\Component\Console\Tester\ApplicationTester; 17 | 18 | class ApplicationTesterTest extends \PHPUnit_Framework_TestCase 19 | { 20 | protected $application; 21 | protected $tester; 22 | 23 | protected function setUp() 24 | { 25 | $this->application = new Application(); 26 | $this->application->setAutoExit(false); 27 | $this->application->register('foo') 28 | ->addArgument('foo') 29 | ->setCode(function ($input, $output) { $output->writeln('foo'); }) 30 | ; 31 | 32 | $this->tester = new ApplicationTester($this->application); 33 | $this->tester->run(array('command' => 'foo', 'foo' => 'bar'), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); 34 | } 35 | 36 | protected function tearDown() 37 | { 38 | $this->application = null; 39 | $this->tester = null; 40 | } 41 | 42 | public function testRun() 43 | { 44 | $this->assertFalse($this->tester->getInput()->isInteractive(), '->execute() takes an interactive option'); 45 | $this->assertFalse($this->tester->getOutput()->isDecorated(), '->execute() takes a decorated option'); 46 | $this->assertEquals(Output::VERBOSITY_VERBOSE, $this->tester->getOutput()->getVerbosity(), '->execute() takes a verbosity option'); 47 | } 48 | 49 | public function testGetInput() 50 | { 51 | $this->assertEquals('bar', $this->tester->getInput()->getArgument('foo'), '->getInput() returns the current input instance'); 52 | } 53 | 54 | public function testGetOutput() 55 | { 56 | rewind($this->tester->getOutput()->getStream()); 57 | $this->assertEquals('foo'.PHP_EOL, stream_get_contents($this->tester->getOutput()->getStream()), '->getOutput() returns the current output instance'); 58 | } 59 | 60 | public function testGetDisplay() 61 | { 62 | $this->assertEquals('foo'.PHP_EOL, $this->tester->getDisplay(), '->getDisplay() returns the display of the last execution'); 63 | } 64 | 65 | public function testGetStatusCode() 66 | { 67 | $this->assertSame(0, $this->tester->getStatusCode(), '->getStatusCode() returns the status code'); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Tests\Tester; 13 | 14 | use Symfony\Component\Console\Application; 15 | use Symfony\Component\Console\Command\Command; 16 | use Symfony\Component\Console\Output\Output; 17 | use Symfony\Component\Console\Tester\CommandTester; 18 | 19 | class CommandTesterTest extends \PHPUnit_Framework_TestCase 20 | { 21 | protected $command; 22 | protected $tester; 23 | 24 | protected function setUp() 25 | { 26 | $this->command = new Command('foo'); 27 | $this->command->addArgument('command'); 28 | $this->command->addArgument('foo'); 29 | $this->command->setCode(function ($input, $output) { $output->writeln('foo'); }); 30 | 31 | $this->tester = new CommandTester($this->command); 32 | $this->tester->execute(array('foo' => 'bar'), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); 33 | } 34 | 35 | protected function tearDown() 36 | { 37 | $this->command = null; 38 | $this->tester = null; 39 | } 40 | 41 | public function testExecute() 42 | { 43 | $this->assertFalse($this->tester->getInput()->isInteractive(), '->execute() takes an interactive option'); 44 | $this->assertFalse($this->tester->getOutput()->isDecorated(), '->execute() takes a decorated option'); 45 | $this->assertEquals(Output::VERBOSITY_VERBOSE, $this->tester->getOutput()->getVerbosity(), '->execute() takes a verbosity option'); 46 | } 47 | 48 | public function testGetInput() 49 | { 50 | $this->assertEquals('bar', $this->tester->getInput()->getArgument('foo'), '->getInput() returns the current input instance'); 51 | } 52 | 53 | public function testGetOutput() 54 | { 55 | rewind($this->tester->getOutput()->getStream()); 56 | $this->assertEquals('foo'.PHP_EOL, stream_get_contents($this->tester->getOutput()->getStream()), '->getOutput() returns the current output instance'); 57 | } 58 | 59 | public function testGetDisplay() 60 | { 61 | $this->assertEquals('foo'.PHP_EOL, $this->tester->getDisplay(), '->getDisplay() returns the display of the last execution'); 62 | } 63 | 64 | public function testGetStatusCode() 65 | { 66 | $this->assertSame(0, $this->tester->getStatusCode(), '->getStatusCode() returns the status code'); 67 | } 68 | 69 | public function testCommandFromApplication() 70 | { 71 | $application = new Application(); 72 | $application->setAutoExit(false); 73 | 74 | $command = new Command('foo'); 75 | $command->setCode(function ($input, $output) { $output->writeln('foo'); }); 76 | 77 | $application->add($command); 78 | 79 | $tester = new CommandTester($application->find('foo')); 80 | 81 | // check that there is no need to pass the command name here 82 | $this->assertEquals(0, $tester->execute(array())); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/console", 3 | "type": "library", 4 | "description": "Symfony Console Component", 5 | "keywords": [], 6 | "homepage": "https://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Fabien Potencier", 11 | "email": "fabien@symfony.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "https://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=5.3.3" 20 | }, 21 | "require-dev": { 22 | "symfony/phpunit-bridge": "~2.7", 23 | "symfony/event-dispatcher": "~2.1", 24 | "symfony/process": "~2.1", 25 | "psr/log": "~1.0" 26 | }, 27 | "suggest": { 28 | "symfony/event-dispatcher": "", 29 | "symfony/process": "", 30 | "psr/log": "For using the console logger" 31 | }, 32 | "autoload": { 33 | "psr-0": { "Symfony\\Component\\Console\\": "" } 34 | }, 35 | "target-dir": "Symfony/Component/Console", 36 | "minimum-stability": "dev", 37 | "extra": { 38 | "branch-alias": { 39 | "dev-master": "2.6-dev" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/symfony/console/Symfony/Component/Console/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 13 | 14 | ./Tests/ 15 | 16 | 17 | 18 | 19 | 20 | ./ 21 | 22 | ./Resources 23 | ./Tests 24 | ./vendor 25 | 26 | 27 | 28 | 29 | --------------------------------------------------------------------------------