commit 581d65afba6dc5241932d4d4b369346235b62ec4 Author: Kamal Nasser Date: Tue Jul 7 23:02:48 2020 +0300 sample-php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b9ced07 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +composer.phar +/vendor/ diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..a4afb61 --- /dev/null +++ b/composer.json @@ -0,0 +1,14 @@ +{ + "name": "digitalocean-apps/sample-php", + "description": "Sample PHP application for App Platform", + "type": "project", + "require": { + "alrik11es/cowsayphp": "^1.2" + }, + "authors": [ + { + "name": "Kamal Nasser", + "email": "kamal@digitalocean.com" + } + ] +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..1da0f0f --- /dev/null +++ b/composer.lock @@ -0,0 +1,73 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "16e03395d34a6908d884db19ef1396b5", + "packages": [ + { + "name": "alrik11es/cowsayphp", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/alrik11es/cowsayphp.git", + "reference": "080dc10c8f5420fef35163569293601f17124eeb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alrik11es/cowsayphp/zipball/080dc10c8f5420fef35163569293601f17124eeb", + "reference": "080dc10c8f5420fef35163569293601f17124eeb", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "5.*", + "scrutinizer/ocular": "~1.1" + }, + "bin": [ + "bin/cowsayphp" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Cowsayphp\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marcos Sigueros", + "email": "alrik11es@gmail.com", + "homepage": "https://github.com/alrik11es", + "role": "Developer" + } + ], + "description": "Cowsay port in PHP", + "homepage": "https://github.com/alrik11es/cowsayphp", + "keywords": [ + "cowsay" + ], + "time": "2016-08-25T07:53:44+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "1.1.0" +} diff --git a/index.php b/index.php new file mode 100644 index 0000000..86bb876 --- /dev/null +++ b/index.php @@ -0,0 +1,14 @@ + to the URL"; +if(isset($_GET['message']) && $_GET['message'] != '') { + $text = $_GET['message']; +} + +$cow = Farm::create(\Cowsayphp\Farm\Cow::class); +echo $cow->say($text);