php-framework-skeleton

Skeleton for php-framework
git clone git://git.finwo.net/misc/php-framework-skeleton
Log | Files | Refs

commit 20a2f4f7f84be4bd53af0a4cfd2683e41ca853c8
parent dbdb7b7997b6d0b96ce03c5c911af13aa31d01db
Author: finwo <finwo@pm.me>
Date:   Wed, 22 Feb 2017 11:54:46 +0100

More structural building

Diffstat:
Mcomposer.json | 4++--
Mcomposer.lock | 37++++++++++++++++++++++++++++++++++++-
Aconfig/bundles.yaml | 2++
Minit.php | 3+++
Asrc/Acme/AcmeBundle/AcmeBundle.php | 8++++++++
Asrc/Acme/AcmeBundle/Controller/DefaultController.php | 14++++++++++++++
Asrc/Acme/AcmeBundle/Document/User.php | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aweb/index.php | 3+++
8 files changed, 126 insertions(+), 3 deletions(-)

diff --git a/composer.json b/composer.json @@ -2,9 +2,9 @@ "name": "finwo/php-framework-skeleton", "require": { "klein/klein": "^2.1", - "mustangostang/spyc": "^0.6.1", "netresearch/jsonmapper": "^1.1", - "php-di/invoker": "^1.3" + "php-di/invoker": "^1.3", + "finwo/datafile": "^0.0.2" }, "license": "MIT", "authors": [ diff --git a/composer.lock b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "1e29e1c8acf0013e2ec9a4212ff0acc8", + "content-hash": "64fa08b510e6d8d6b4bc1df3e86dd320", "packages": [ { "name": "container-interop/container-interop", @@ -38,6 +38,41 @@ "time": "2017-02-14T19:40:03+00:00" }, { + "name": "finwo/datafile", + "version": "v0.0.2", + "source": { + "type": "git", + "url": "https://github.com/finwo/php-datafile.git", + "reference": "f6129579e058c20a99328de757427d2bc0ea4b6c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/finwo/php-datafile/zipball/f6129579e058c20a99328de757427d2bc0ea4b6c", + "reference": "f6129579e058c20a99328de757427d2bc0ea4b6c", + "shasum": "" + }, + "require": { + "mustangostang/spyc": "^0.6.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Finwo\\DataFile\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Robin Bron", + "email": "robin@finwo.nl" + } + ], + "time": "2017-02-22T10:43:22+00:00" + }, + { "name": "klein/klein", "version": "v2.1.2", "source": { diff --git a/config/bundles.yaml b/config/bundles.yaml @@ -0,0 +1,2 @@ +bundles: + - Acme\AcmeBundle diff --git a/init.php b/init.php @@ -1,4 +1,7 @@ <?php + +// Entry point for SGI-like httpd + $f = fopen('php://stdin', 'r'); $line = str_replace("\r",'',str_replace("\r\n", "\n", fgets($f))); $tokens = explode(' ', $line); diff --git a/src/Acme/AcmeBundle/AcmeBundle.php b/src/Acme/AcmeBundle/AcmeBundle.php @@ -0,0 +1,8 @@ +<?php + +namespace Acme\AcmeBundle; + +class AcmeBundle +{ + +} diff --git a/src/Acme/AcmeBundle/Controller/DefaultController.php b/src/Acme/AcmeBundle/Controller/DefaultController.php @@ -0,0 +1,14 @@ +<?php + +namespace Acme\AcmeBundle\Controller; + +class DefaultController +{ + public function defaultAction() + { + return array( + "status" => 200, + "result" => "Raw data returning by controllers is supported" + ); + } +} diff --git a/src/Acme/AcmeBundle/Document/User.php b/src/Acme/AcmeBundle/Document/User.php @@ -0,0 +1,58 @@ +<?php + +namespace Acme\AcmeBundle\Document; + +class User +{ + /** + * @var string + */ + protected $name; + + /** + * @var string + */ + protected $password; + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * @param string $name + * + * @return User + */ + public function setName($name) + { + $this->name = $name; + + return $this; + } + + /** + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * @param string $password + * + * @return User + */ + public function setPassword($password) + { + $this->password = $password; + + return $this; + } + + +} diff --git a/web/index.php b/web/index.php @@ -0,0 +1,3 @@ +<?php + +// Entry point for apache-like httpd