├── .gitignore
├── LICENSE
├── README.md
├── imgs
└── php-framework-vs.png
├── laravel-5.5.0
├── .env.example
├── .gitattributes
├── .gitignore
├── app
│ ├── Console
│ │ └── Kernel.php
│ ├── Exceptions
│ │ └── Handler.php
│ ├── Http
│ │ ├── Controllers
│ │ │ ├── Auth
│ │ │ │ ├── ForgotPasswordController.php
│ │ │ │ ├── LoginController.php
│ │ │ │ ├── RegisterController.php
│ │ │ │ └── ResetPasswordController.php
│ │ │ └── Controller.php
│ │ ├── Kernel.php
│ │ └── Middleware
│ │ │ ├── EncryptCookies.php
│ │ │ ├── RedirectIfAuthenticated.php
│ │ │ ├── TrimStrings.php
│ │ │ ├── TrustProxies.php
│ │ │ └── VerifyCsrfToken.php
│ ├── Providers
│ │ ├── AppServiceProvider.php
│ │ ├── AuthServiceProvider.php
│ │ ├── BroadcastServiceProvider.php
│ │ ├── EventServiceProvider.php
│ │ └── RouteServiceProvider.php
│ └── User.php
├── artisan
├── bootstrap
│ ├── app.php
│ └── cache
│ │ └── .gitignore
├── composer.json
├── composer.lock
├── config
│ ├── app.php
│ ├── auth.php
│ ├── broadcasting.php
│ ├── cache.php
│ ├── database.php
│ ├── filesystems.php
│ ├── mail.php
│ ├── queue.php
│ ├── services.php
│ ├── session.php
│ └── view.php
├── database
│ ├── .gitignore
│ ├── factories
│ │ └── UserFactory.php
│ ├── migrations
│ │ ├── 2014_10_12_000000_create_users_table.php
│ │ └── 2014_10_12_100000_create_password_resets_table.php
│ └── seeds
│ │ └── DatabaseSeeder.php
├── package.json
├── phpunit.xml
├── public
│ ├── .htaccess
│ ├── css
│ │ └── app.css
│ ├── favicon.ico
│ ├── index.php
│ ├── js
│ │ └── app.js
│ ├── robots.txt
│ └── web.config
├── readme.md
├── resources
│ ├── assets
│ │ ├── js
│ │ │ ├── app.js
│ │ │ ├── bootstrap.js
│ │ │ └── components
│ │ │ │ └── Example.vue
│ │ └── sass
│ │ │ ├── _variables.scss
│ │ │ └── app.scss
│ ├── lang
│ │ └── en
│ │ │ ├── auth.php
│ │ │ ├── pagination.php
│ │ │ ├── passwords.php
│ │ │ └── validation.php
│ └── views
│ │ └── welcome.blade.php
├── routes
│ ├── api.php
│ ├── channels.php
│ ├── console.php
│ └── web.php
├── server.php
├── storage
│ ├── app
│ │ ├── .gitignore
│ │ └── public
│ │ │ └── .gitignore
│ ├── framework
│ │ ├── .gitignore
│ │ ├── cache
│ │ │ └── .gitignore
│ │ ├── sessions
│ │ │ └── .gitignore
│ │ ├── testing
│ │ │ └── .gitignore
│ │ └── views
│ │ │ └── .gitignore
│ └── logs
│ │ └── .gitignore
├── tests
│ ├── CreatesApplication.php
│ ├── Feature
│ │ └── ExampleTest.php
│ ├── TestCase.php
│ └── Unit
│ │ └── ExampleTest.php
└── webpack.mix.js
├── lumen-5.5.0
├── .env.example
├── .gitignore
├── app
│ ├── Console
│ │ ├── Commands
│ │ │ └── .gitkeep
│ │ └── Kernel.php
│ ├── Events
│ │ ├── Event.php
│ │ └── ExampleEvent.php
│ ├── Exceptions
│ │ └── Handler.php
│ ├── Http
│ │ ├── Controllers
│ │ │ ├── Controller.php
│ │ │ └── ExampleController.php
│ │ └── Middleware
│ │ │ ├── Authenticate.php
│ │ │ └── ExampleMiddleware.php
│ ├── Jobs
│ │ ├── ExampleJob.php
│ │ └── Job.php
│ ├── Listeners
│ │ └── ExampleListener.php
│ ├── Providers
│ │ ├── AppServiceProvider.php
│ │ ├── AuthServiceProvider.php
│ │ └── EventServiceProvider.php
│ └── User.php
├── artisan
├── bootstrap
│ └── app.php
├── composer.json
├── composer.lock
├── database
│ ├── factories
│ │ └── ModelFactory.php
│ ├── migrations
│ │ └── .gitkeep
│ └── seeds
│ │ └── DatabaseSeeder.php
├── phpunit.xml
├── public
│ ├── .htaccess
│ └── index.php
├── readme.md
├── resources
│ └── views
│ │ └── .gitkeep
├── routes
│ └── web.php
├── storage
│ ├── app
│ │ └── .gitignore
│ ├── framework
│ │ ├── cache
│ │ │ └── .gitignore
│ │ └── views
│ │ │ └── .gitignore
│ └── logs
│ │ └── .gitignore
└── tests
│ ├── ExampleTest.php
│ └── TestCase.php
├── silex-2.0.2
├── .gitignore
├── LICENSE
├── README.rst
├── bin
│ └── console
├── composer.json
├── composer.lock
├── config
│ ├── dev.php
│ └── prod.php
├── phpunit.xml.dist
├── src
│ ├── app.php
│ ├── console.php
│ └── controllers.php
├── templates
│ ├── errors
│ │ ├── 404.html.twig
│ │ ├── 4xx.html.twig
│ │ ├── 500.html.twig
│ │ ├── 5xx.html.twig
│ │ └── default.html.twig
│ ├── index.html.twig
│ └── layout.html.twig
├── tests
│ └── controllersTest.php
├── var
│ ├── cache
│ │ └── .gitignore
│ └── logs
│ │ └── .gitignore
└── web
│ ├── css
│ └── main.css
│ ├── index.php
│ └── index_dev.php
├── silm-3.1.4
├── .gitignore
├── CONTRIBUTING.md
├── README.md
├── composer.json
├── composer.lock
├── docker-compose.yml
├── logs
│ └── README.md
├── phpunit.xml
├── public
│ ├── .htaccess
│ └── index.php
├── src
│ ├── dependencies.php
│ ├── middleware.php
│ ├── routes.php
│ └── settings.php
├── templates
│ └── index.phtml
└── tests
│ └── Functional
│ ├── BaseTestCase.php
│ └── HomepageTest.php
├── symfony-3.3.10
├── .gitignore
├── LICENSE
├── README.md
├── app
│ ├── .htaccess
│ ├── AppCache.php
│ ├── AppKernel.php
│ ├── Resources
│ │ └── views
│ │ │ ├── base.html.twig
│ │ │ └── default
│ │ │ └── index.html.twig
│ └── config
│ │ ├── config.yml
│ │ ├── config_dev.yml
│ │ ├── config_prod.yml
│ │ ├── config_test.yml
│ │ ├── parameters.yml.dist
│ │ ├── routing.yml
│ │ ├── routing_dev.yml
│ │ ├── security.yml
│ │ └── services.yml
├── bin
│ ├── console
│ └── symfony_requirements
├── composer.json
├── composer.lock
├── phpunit.xml.dist
├── src
│ ├── .htaccess
│ └── AppBundle
│ │ ├── AppBundle.php
│ │ └── Controller
│ │ └── DefaultController.php
├── tests
│ └── AppBundle
│ │ └── Controller
│ │ └── DefaultControllerTest.php
├── var
│ ├── SymfonyRequirements.php
│ ├── cache
│ │ └── .gitkeep
│ ├── logs
│ │ └── .gitkeep
│ └── sessions
│ │ └── .gitkeep
└── web
│ ├── .htaccess
│ ├── app.php
│ ├── app_dev.php
│ ├── apple-touch-icon.png
│ ├── config.php
│ ├── favicon.ico
│ └── robots.txt
├── tastphp-1.3.6
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── _config.yml
├── bin
│ └── console
├── composer.json
├── composer.lock
├── config
│ ├── config.yml
│ ├── example.app.yml
│ ├── example.dbs.yml
│ ├── example.listeners.yml
│ ├── example.migrations-db.php
│ ├── example.parameters.yml
│ ├── migrations.yml
│ ├── routes.yml
│ └── routes_test.yml
├── docs
│ ├── .gitkeep
│ └── CHANGELOG.md
├── migrations
│ └── .gitkeep
├── phpunit.xml.dist
├── src
│ ├── App
│ │ └── AppKernel.php
│ ├── Common
│ │ ├── Config
│ │ │ └── config.yml
│ │ ├── Controller.php
│ │ └── Kit
│ │ │ └── Validator.php
│ ├── FrontBundle
│ │ ├── Config
│ │ │ ├── listeners.yml
│ │ │ └── routes.yml
│ │ ├── Controller
│ │ │ └── HomeController.php
│ │ ├── Listener
│ │ │ ├── .gitkeep
│ │ │ ├── FooListener.php
│ │ │ └── RequestListener.php
│ │ └── Twig
│ │ │ └── Extension
│ │ │ └── WebExtension.php
│ └── Service
│ │ ├── .gitkeep
│ │ ├── Common
│ │ ├── BaseDao.php
│ │ ├── BaseService.php
│ │ └── DaoException.php
│ │ └── ServiceKernel.php
├── tests
│ ├── .gitkeep
│ ├── AppTest.php
│ ├── bootstrap.php
│ ├── config
│ │ ├── app.yml
│ │ ├── config.yml
│ │ ├── dbs.yml
│ │ ├── parameters.yml
│ │ ├── routes.yml
│ │ └── routes_test.yml
│ ├── src
│ │ └── TestBundle
│ │ │ ├── Config
│ │ │ └── routes.yml
│ │ │ └── Controller
│ │ │ └── FooController.php
│ └── web
│ │ └── views
│ │ ├── errors
│ │ └── .gitkeep
│ │ └── frontBundle
│ │ └── .gitkeep
└── web
│ ├── bootstrap.php
│ ├── favicon.ico
│ ├── index.php
│ └── views
│ ├── errors
│ ├── 404.html
│ └── 500.html
│ └── frontBundle
│ └── home
│ └── index.html.twig
└── yii2-2.0.12
├── .bowerrc
├── .gitignore
├── LICENSE.md
├── README.md
├── assets
└── AppAsset.php
├── codeception.yml
├── commands
└── HelloController.php
├── composer.json
├── composer.lock
├── config
├── console.php
├── db.php
├── params.php
├── test.php
├── test_db.php
└── web.php
├── controllers
└── SiteController.php
├── mail
└── layouts
│ └── html.php
├── models
├── ContactForm.php
├── LoginForm.php
└── User.php
├── requirements.php
├── runtime
└── .gitignore
├── tests
├── _bootstrap.php
├── _data
│ └── .gitkeep
├── _output
│ └── .gitignore
├── _support
│ ├── AcceptanceTester.php
│ ├── FunctionalTester.php
│ └── UnitTester.php
├── acceptance.suite.yml.example
├── acceptance
│ ├── AboutCest.php
│ ├── ContactCest.php
│ ├── HomeCest.php
│ ├── LoginCest.php
│ └── _bootstrap.php
├── bin
│ ├── yii
│ └── yii.bat
├── functional.suite.yml
├── functional
│ ├── ContactFormCest.php
│ ├── LoginFormCest.php
│ └── _bootstrap.php
├── unit.suite.yml
└── unit
│ ├── _bootstrap.php
│ └── models
│ ├── ContactFormTest.php
│ ├── LoginFormTest.php
│ └── UserTest.php
├── views
├── layouts
│ └── main.php
└── site
│ ├── about.php
│ ├── contact.php
│ ├── error.php
│ ├── index.php
│ └── login.php
├── web
├── assets
│ └── .gitignore
├── css
│ └── site.css
├── favicon.ico
├── index-test.php
├── index.php
└── robots.txt
├── yii
└── yii.bat
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 徐佳军
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/imgs/php-framework-vs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/imgs/php-framework-vs.png
--------------------------------------------------------------------------------
/laravel-5.5.0/.env.example:
--------------------------------------------------------------------------------
1 | APP_NAME=Laravel
2 | APP_ENV=local
3 | APP_KEY=
4 | APP_DEBUG=true
5 | APP_LOG_LEVEL=debug
6 | APP_URL=http://localhost
7 |
8 | DB_CONNECTION=mysql
9 | DB_HOST=127.0.0.1
10 | DB_PORT=3306
11 | DB_DATABASE=homestead
12 | DB_USERNAME=homestead
13 | DB_PASSWORD=secret
14 |
15 | BROADCAST_DRIVER=log
16 | CACHE_DRIVER=file
17 | SESSION_DRIVER=file
18 | QUEUE_DRIVER=sync
19 |
20 | REDIS_HOST=127.0.0.1
21 | REDIS_PASSWORD=null
22 | REDIS_PORT=6379
23 |
24 | MAIL_DRIVER=smtp
25 | MAIL_HOST=smtp.mailtrap.io
26 | MAIL_PORT=2525
27 | MAIL_USERNAME=null
28 | MAIL_PASSWORD=null
29 | MAIL_ENCRYPTION=null
30 |
31 | PUSHER_APP_ID=
32 | PUSHER_APP_KEY=
33 | PUSHER_APP_SECRET=
34 |
--------------------------------------------------------------------------------
/laravel-5.5.0/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/laravel-5.5.0/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /vendor
6 | /.idea
7 | /.vagrant
8 | Homestead.json
9 | Homestead.yaml
10 | npm-debug.log
11 | yarn-error.log
12 | .env
13 |
--------------------------------------------------------------------------------
/laravel-5.5.0/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')
28 | // ->hourly();
29 | }
30 |
31 | /**
32 | * Register the commands for the application.
33 | *
34 | * @return void
35 | */
36 | protected function commands()
37 | {
38 | $this->load(__DIR__.'/Commands');
39 |
40 | require base_path('routes/console.php');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/laravel-5.5.0/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/laravel-5.5.0/app/Http/Controllers/Auth/LoginController.php:
--------------------------------------------------------------------------------
1 | middleware('guest')->except('logout');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/laravel-5.5.0/app/Http/Controllers/Auth/RegisterController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
40 | }
41 |
42 | /**
43 | * Get a validator for an incoming registration request.
44 | *
45 | * @param array $data
46 | * @return \Illuminate\Contracts\Validation\Validator
47 | */
48 | protected function validator(array $data)
49 | {
50 | return Validator::make($data, [
51 | 'name' => 'required|string|max:255',
52 | 'email' => 'required|string|email|max:255|unique:users',
53 | 'password' => 'required|string|min:6|confirmed',
54 | ]);
55 | }
56 |
57 | /**
58 | * Create a new user instance after a valid registration.
59 | *
60 | * @param array $data
61 | * @return \App\User
62 | */
63 | protected function create(array $data)
64 | {
65 | return User::create([
66 | 'name' => $data['name'],
67 | 'email' => $data['email'],
68 | 'password' => bcrypt($data['password']),
69 | ]);
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/laravel-5.5.0/app/Http/Controllers/Auth/ResetPasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/laravel-5.5.0/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | [
31 | \App\Http\Middleware\EncryptCookies::class,
32 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
33 | \Illuminate\Session\Middleware\StartSession::class,
34 | // \Illuminate\Session\Middleware\AuthenticateSession::class,
35 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
36 | \App\Http\Middleware\VerifyCsrfToken::class,
37 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
38 | ],
39 |
40 | 'api' => [
41 | 'throttle:60,1',
42 | 'bindings',
43 | ],
44 | ];
45 |
46 | /**
47 | * The application's route middleware.
48 | *
49 | * These middleware may be assigned to groups or used individually.
50 | *
51 | * @var array
52 | */
53 | protected $routeMiddleware = [
54 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
55 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
56 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
57 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
58 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
59 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
60 | ];
61 | }
62 |
--------------------------------------------------------------------------------
/laravel-5.5.0/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 | check()) {
21 | return redirect('/home');
22 | }
23 |
24 | return $next($request);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/laravel-5.5.0/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | 'FORWARDED',
24 | Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
25 | Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
26 | Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
27 | Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
28 | ];
29 | }
30 |
--------------------------------------------------------------------------------
/laravel-5.5.0/app/Http/Middleware/VerifyCsrfToken.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\ModelPolicy',
17 | ];
18 |
19 | /**
20 | * Register any authentication / authorization services.
21 | *
22 | * @return void
23 | */
24 | public function boot()
25 | {
26 | $this->registerPolicies();
27 |
28 | //
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/laravel-5.5.0/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
17 | 'App\Listeners\EventListener',
18 | ],
19 | ];
20 |
21 | /**
22 | * Register any events for your application.
23 | *
24 | * @return void
25 | */
26 | public function boot()
27 | {
28 | parent::boot();
29 |
30 | //
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/laravel-5.5.0/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | mapApiRoutes();
39 |
40 | $this->mapWebRoutes();
41 |
42 | //
43 | }
44 |
45 | /**
46 | * Define the "web" routes for the application.
47 | *
48 | * These routes all receive session state, CSRF protection, etc.
49 | *
50 | * @return void
51 | */
52 | protected function mapWebRoutes()
53 | {
54 | Route::middleware('web')
55 | ->namespace($this->namespace)
56 | ->group(base_path('routes/web.php'));
57 | }
58 |
59 | /**
60 | * Define the "api" routes for the application.
61 | *
62 | * These routes are typically stateless.
63 | *
64 | * @return void
65 | */
66 | protected function mapApiRoutes()
67 | {
68 | Route::prefix('api')
69 | ->middleware('api')
70 | ->namespace($this->namespace)
71 | ->group(base_path('routes/api.php'));
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/laravel-5.5.0/app/User.php:
--------------------------------------------------------------------------------
1 | make(Illuminate\Contracts\Console\Kernel::class);
34 |
35 | $status = $kernel->handle(
36 | $input = new Symfony\Component\Console\Input\ArgvInput,
37 | new Symfony\Component\Console\Output\ConsoleOutput
38 | );
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Shutdown The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once Artisan has finished running, we will fire off the shutdown events
46 | | so that any final work may be done by the application before we shut
47 | | down the process. This is the last thing to happen to the request.
48 | |
49 | */
50 |
51 | $kernel->terminate($input, $status);
52 |
53 | exit($status);
54 |
--------------------------------------------------------------------------------
/laravel-5.5.0/bootstrap/app.php:
--------------------------------------------------------------------------------
1 | singleton(
30 | Illuminate\Contracts\Http\Kernel::class,
31 | App\Http\Kernel::class
32 | );
33 |
34 | $app->singleton(
35 | Illuminate\Contracts\Console\Kernel::class,
36 | App\Console\Kernel::class
37 | );
38 |
39 | $app->singleton(
40 | Illuminate\Contracts\Debug\ExceptionHandler::class,
41 | App\Exceptions\Handler::class
42 | );
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Return The Application
47 | |--------------------------------------------------------------------------
48 | |
49 | | This script returns the application instance. The instance is given to
50 | | the calling script so we can separate the building of the instances
51 | | from the actual running of the application and sending responses.
52 | |
53 | */
54 |
55 | return $app;
56 |
--------------------------------------------------------------------------------
/laravel-5.5.0/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/laravel-5.5.0/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "laravel/laravel",
3 | "description": "The Laravel Framework.",
4 | "keywords": ["framework", "laravel"],
5 | "license": "MIT",
6 | "type": "project",
7 | "require": {
8 | "php": ">=7.0.0",
9 | "fideloper/proxy": "~3.3",
10 | "laravel/framework": "5.5.*",
11 | "laravel/tinker": "~1.0",
12 | "symfony/var-dumper": "^3.3"
13 | },
14 | "require-dev": {
15 | "filp/whoops": "~2.0",
16 | "fzaninotto/faker": "~1.4",
17 | "mockery/mockery": "0.9.*",
18 | "phpunit/phpunit": "~6.0"
19 | },
20 | "autoload": {
21 | "classmap": [
22 | "database/seeds",
23 | "database/factories"
24 | ],
25 | "psr-4": {
26 | "App\\": "app/"
27 | }
28 | },
29 | "autoload-dev": {
30 | "psr-4": {
31 | "Tests\\": "tests/"
32 | }
33 | },
34 | "extra": {
35 | "laravel": {
36 | "dont-discover": [
37 | ]
38 | }
39 | },
40 | "scripts": {
41 | "post-root-package-install": [
42 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
43 | ],
44 | "post-create-project-cmd": [
45 | "@php artisan key:generate"
46 | ],
47 | "post-autoload-dump": [
48 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
49 | "@php artisan package:discover"
50 | ]
51 | },
52 | "config": {
53 | "preferred-install": "dist",
54 | "sort-packages": true,
55 | "optimize-autoloader": true
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/laravel-5.5.0/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'null'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_APP_KEY'),
36 | 'secret' => env('PUSHER_APP_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | //
40 | ],
41 | ],
42 |
43 | 'redis' => [
44 | 'driver' => 'redis',
45 | 'connection' => 'default',
46 | ],
47 |
48 | 'log' => [
49 | 'driver' => 'log',
50 | ],
51 |
52 | 'null' => [
53 | 'driver' => 'null',
54 | ],
55 |
56 | ],
57 |
58 | ];
59 |
--------------------------------------------------------------------------------
/laravel-5.5.0/config/filesystems.php:
--------------------------------------------------------------------------------
1 | env('FILESYSTEM_DRIVER', 'local'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Cloud Filesystem Disk
21 | |--------------------------------------------------------------------------
22 | |
23 | | Many applications store files both locally and in the cloud. For this
24 | | reason, you may specify a default "cloud" driver here. This driver
25 | | will be bound as the Cloud disk implementation in the container.
26 | |
27 | */
28 |
29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Filesystem Disks
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here you may configure as many filesystem "disks" as you wish, and you
37 | | may even configure multiple disks of the same driver. Defaults have
38 | | been setup for each driver as an example of the required options.
39 | |
40 | | Supported Drivers: "local", "ftp", "s3", "rackspace"
41 | |
42 | */
43 |
44 | 'disks' => [
45 |
46 | 'local' => [
47 | 'driver' => 'local',
48 | 'root' => storage_path('app'),
49 | ],
50 |
51 | 'public' => [
52 | 'driver' => 'local',
53 | 'root' => storage_path('app/public'),
54 | 'url' => env('APP_URL').'/storage',
55 | 'visibility' => 'public',
56 | ],
57 |
58 | 's3' => [
59 | 'driver' => 's3',
60 | 'key' => env('AWS_KEY'),
61 | 'secret' => env('AWS_SECRET'),
62 | 'region' => env('AWS_REGION'),
63 | 'bucket' => env('AWS_BUCKET'),
64 | ],
65 |
66 | ],
67 |
68 | ];
69 |
--------------------------------------------------------------------------------
/laravel-5.5.0/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | ],
21 |
22 | 'ses' => [
23 | 'key' => env('SES_KEY'),
24 | 'secret' => env('SES_SECRET'),
25 | 'region' => 'us-east-1',
26 | ],
27 |
28 | 'sparkpost' => [
29 | 'secret' => env('SPARKPOST_SECRET'),
30 | ],
31 |
32 | 'stripe' => [
33 | 'model' => App\User::class,
34 | 'key' => env('STRIPE_KEY'),
35 | 'secret' => env('STRIPE_SECRET'),
36 | ],
37 |
38 | ];
39 |
--------------------------------------------------------------------------------
/laravel-5.5.0/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => realpath(storage_path('framework/views')),
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/laravel-5.5.0/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 |
--------------------------------------------------------------------------------
/laravel-5.5.0/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 | define(App\User::class, function (Faker $faker) {
17 | static $password;
18 |
19 | return [
20 | 'name' => $faker->name,
21 | 'email' => $faker->unique()->safeEmail,
22 | 'password' => $password ?: $password = bcrypt('secret'),
23 | 'remember_token' => str_random(10),
24 | ];
25 | });
26 |
--------------------------------------------------------------------------------
/laravel-5.5.0/database/migrations/2014_10_12_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->string('name');
19 | $table->string('email')->unique();
20 | $table->string('password');
21 | $table->rememberToken();
22 | $table->timestamps();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | *
29 | * @return void
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('users');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/laravel-5.5.0/database/migrations/2014_10_12_100000_create_password_resets_table.php:
--------------------------------------------------------------------------------
1 | string('email')->index();
18 | $table->string('token');
19 | $table->timestamp('created_at')->nullable();
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | *
26 | * @return void
27 | */
28 | public function down()
29 | {
30 | Schema::dropIfExists('password_resets');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/laravel-5.5.0/database/seeds/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call(UsersTableSeeder::class);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/laravel-5.5.0/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
7 | "watch-poll": "npm run watch -- --watch-poll",
8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
9 | "prod": "npm run production",
10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11 | },
12 | "devDependencies": {
13 | "axios": "^0.16.2",
14 | "bootstrap-sass": "^3.3.7",
15 | "cross-env": "^5.0.1",
16 | "jquery": "^3.1.1",
17 | "laravel-mix": "^1.0",
18 | "lodash": "^4.17.4",
19 | "vue": "^2.1.10"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/laravel-5.5.0/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 | ./tests/Feature
14 |
15 |
16 |
17 | ./tests/Unit
18 |
19 |
20 |
21 |
22 | ./app
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/laravel-5.5.0/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Redirect Trailing Slashes If Not A Folder...
9 | RewriteCond %{REQUEST_FILENAME} !-d
10 | RewriteCond %{REQUEST_URI} (.+)/$
11 | RewriteRule ^ %1 [L,R=301]
12 |
13 | # Handle Front Controller...
14 | RewriteCond %{REQUEST_FILENAME} !-d
15 | RewriteCond %{REQUEST_FILENAME} !-f
16 | RewriteRule ^ index.php [L]
17 |
18 | # Handle Authorization Header
19 | RewriteCond %{HTTP:Authorization} .
20 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
21 |
22 |
--------------------------------------------------------------------------------
/laravel-5.5.0/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/laravel-5.5.0/public/favicon.ico
--------------------------------------------------------------------------------
/laravel-5.5.0/public/index.php:
--------------------------------------------------------------------------------
1 |
7 | */
8 |
9 | define('LARAVEL_START', microtime(true));
10 |
11 | /*
12 | |--------------------------------------------------------------------------
13 | | Register The Auto Loader
14 | |--------------------------------------------------------------------------
15 | |
16 | | Composer provides a convenient, automatically generated class loader for
17 | | our application. We just need to utilize it! We'll simply require it
18 | | into the script here so that we don't have to worry about manual
19 | | loading any of our classes later on. It feels great to relax.
20 | |
21 | */
22 |
23 | require __DIR__.'/../vendor/autoload.php';
24 |
25 | /*
26 | |--------------------------------------------------------------------------
27 | | Turn On The Lights
28 | |--------------------------------------------------------------------------
29 | |
30 | | We need to illuminate PHP development, so let us turn on the lights.
31 | | This bootstraps the framework and gets it ready for use, then it
32 | | will load up this application so that we can run it and send
33 | | the responses back to the browser and delight our users.
34 | |
35 | */
36 |
37 | $app = require_once __DIR__.'/../bootstrap/app.php';
38 |
39 | /*
40 | |--------------------------------------------------------------------------
41 | | Run The Application
42 | |--------------------------------------------------------------------------
43 | |
44 | | Once we have the application, we can handle the incoming request
45 | | through the kernel, and send the associated response back to
46 | | the client's browser allowing them to enjoy the creative
47 | | and wonderful application we have prepared for them.
48 | |
49 | */
50 |
51 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
52 |
53 | $response = $kernel->handle(
54 | $request = Illuminate\Http\Request::capture()
55 | );
56 |
57 | $response->send();
58 |
59 | $kernel->terminate($request, $response);
60 |
61 |
--------------------------------------------------------------------------------
/laravel-5.5.0/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/laravel-5.5.0/public/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/laravel-5.5.0/resources/assets/js/app.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * First we will load all of this project's JavaScript dependencies which
4 | * includes Vue and other libraries. It is a great starting point when
5 | * building robust, powerful web applications using Vue and Laravel.
6 | */
7 |
8 | require('./bootstrap');
9 |
10 | window.Vue = require('vue');
11 |
12 | /**
13 | * Next, we will create a fresh Vue application instance and attach it to
14 | * the page. Then, you may begin adding components to this application
15 | * or customize the JavaScript scaffolding to fit your unique needs.
16 | */
17 |
18 | Vue.component('example', require('./components/Example.vue'));
19 |
20 | const app = new Vue({
21 | el: '#app'
22 | });
23 |
--------------------------------------------------------------------------------
/laravel-5.5.0/resources/assets/js/bootstrap.js:
--------------------------------------------------------------------------------
1 |
2 | window._ = require('lodash');
3 |
4 | /**
5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support
6 | * for JavaScript based Bootstrap features such as modals and tabs. This
7 | * code may be modified to fit the specific needs of your application.
8 | */
9 |
10 | try {
11 | window.$ = window.jQuery = require('jquery');
12 |
13 | require('bootstrap-sass');
14 | } catch (e) {}
15 |
16 | /**
17 | * We'll load the axios HTTP library which allows us to easily issue requests
18 | * to our Laravel back-end. This library automatically handles sending the
19 | * CSRF token as a header based on the value of the "XSRF" token cookie.
20 | */
21 |
22 | window.axios = require('axios');
23 |
24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
25 |
26 | /**
27 | * Next we will register the CSRF Token as a common header with Axios so that
28 | * all outgoing HTTP requests automatically have it attached. This is just
29 | * a simple convenience so we don't have to attach every token manually.
30 | */
31 |
32 | let token = document.head.querySelector('meta[name="csrf-token"]');
33 |
34 | if (token) {
35 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
36 | } else {
37 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
38 | }
39 |
40 | /**
41 | * Echo exposes an expressive API for subscribing to channels and listening
42 | * for events that are broadcast by Laravel. Echo and event broadcasting
43 | * allows your team to easily build robust real-time web applications.
44 | */
45 |
46 | // import Echo from 'laravel-echo'
47 |
48 | // window.Pusher = require('pusher-js');
49 |
50 | // window.Echo = new Echo({
51 | // broadcaster: 'pusher',
52 | // key: 'your-pusher-key'
53 | // });
54 |
--------------------------------------------------------------------------------
/laravel-5.5.0/resources/assets/js/components/Example.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Example Component
7 |
8 |
9 | I'm an example component!
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
24 |
--------------------------------------------------------------------------------
/laravel-5.5.0/resources/assets/sass/_variables.scss:
--------------------------------------------------------------------------------
1 |
2 | // Body
3 | $body-bg: #f5f8fa;
4 |
5 | // Borders
6 | $laravel-border-color: darken($body-bg, 10%);
7 | $list-group-border: $laravel-border-color;
8 | $navbar-default-border: $laravel-border-color;
9 | $panel-default-border: $laravel-border-color;
10 | $panel-inner-border: $laravel-border-color;
11 |
12 | // Brands
13 | $brand-primary: #3097D1;
14 | $brand-info: #8eb4cb;
15 | $brand-success: #2ab27b;
16 | $brand-warning: #cbb956;
17 | $brand-danger: #bf5329;
18 |
19 | // Typography
20 | $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/";
21 | $font-family-sans-serif: "Raleway", sans-serif;
22 | $font-size-base: 14px;
23 | $line-height-base: 1.6;
24 | $text-color: #636b6f;
25 |
26 | // Navbar
27 | $navbar-default-bg: #fff;
28 |
29 | // Buttons
30 | $btn-default-color: $text-color;
31 |
32 | // Inputs
33 | $input-border: lighten($text-color, 40%);
34 | $input-border-focus: lighten($brand-primary, 25%);
35 | $input-color-placeholder: lighten($text-color, 30%);
36 |
37 | // Panels
38 | $panel-default-heading-bg: #fff;
39 |
--------------------------------------------------------------------------------
/laravel-5.5.0/resources/assets/sass/app.scss:
--------------------------------------------------------------------------------
1 |
2 | // Fonts
3 | @import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
4 |
5 | // Variables
6 | @import "variables";
7 |
8 | // Bootstrap
9 | @import "~bootstrap-sass/assets/stylesheets/bootstrap";
10 |
--------------------------------------------------------------------------------
/laravel-5.5.0/resources/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/laravel-5.5.0/resources/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 | 'next' => 'Next »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/laravel-5.5.0/resources/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Passwords must be at least six characters and match the confirmation.',
17 | 'reset' => 'Your password has been reset!',
18 | 'sent' => 'We have e-mailed your password reset link!',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that e-mail address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/laravel-5.5.0/routes/api.php:
--------------------------------------------------------------------------------
1 | get('/user', function (Request $request) {
17 | return $request->user();
18 | });
19 |
--------------------------------------------------------------------------------
/laravel-5.5.0/routes/channels.php:
--------------------------------------------------------------------------------
1 | id === (int) $id;
16 | });
17 |
--------------------------------------------------------------------------------
/laravel-5.5.0/routes/console.php:
--------------------------------------------------------------------------------
1 | comment(Inspiring::quote());
18 | })->describe('Display an inspiring quote');
19 |
--------------------------------------------------------------------------------
/laravel-5.5.0/routes/web.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | $uri = urldecode(
11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
12 | );
13 |
14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the
15 | // built-in PHP web server. This provides a convenient way to test a Laravel
16 | // application without having installed a "real" web server software here.
17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
18 | return false;
19 | }
20 |
21 | require_once __DIR__.'/public/index.php';
22 |
--------------------------------------------------------------------------------
/laravel-5.5.0/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/laravel-5.5.0/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/laravel-5.5.0/storage/framework/.gitignore:
--------------------------------------------------------------------------------
1 | config.php
2 | routes.php
3 | schedule-*
4 | compiled.php
5 | services.json
6 | events.scanned.php
7 | routes.scanned.php
8 | down
9 |
--------------------------------------------------------------------------------
/laravel-5.5.0/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/laravel-5.5.0/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/laravel-5.5.0/storage/framework/testing/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/laravel-5.5.0/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/laravel-5.5.0/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/laravel-5.5.0/tests/CreatesApplication.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class)->bootstrap();
19 |
20 | return $app;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/laravel-5.5.0/tests/Feature/ExampleTest.php:
--------------------------------------------------------------------------------
1 | get('/');
18 |
19 | $response->assertStatus(200);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/laravel-5.5.0/tests/TestCase.php:
--------------------------------------------------------------------------------
1 | assertTrue(true);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/laravel-5.5.0/webpack.mix.js:
--------------------------------------------------------------------------------
1 | let mix = require('laravel-mix');
2 |
3 | /*
4 | |--------------------------------------------------------------------------
5 | | Mix Asset Management
6 | |--------------------------------------------------------------------------
7 | |
8 | | Mix provides a clean, fluent API for defining some Webpack build steps
9 | | for your Laravel application. By default, we are compiling the Sass
10 | | file for the application as well as bundling up all the JS files.
11 | |
12 | */
13 |
14 | mix.js('resources/assets/js/app.js', 'public/js')
15 | .sass('resources/assets/sass/app.scss', 'public/css');
16 |
--------------------------------------------------------------------------------
/lumen-5.5.0/.env.example:
--------------------------------------------------------------------------------
1 | APP_ENV=local
2 | APP_DEBUG=true
3 | APP_KEY=
4 | APP_TIMEZONE=UTC
5 |
6 | DB_CONNECTION=mysql
7 | DB_HOST=127.0.0.1
8 | DB_PORT=3306
9 | DB_DATABASE=homestead
10 | DB_USERNAME=homestead
11 | DB_PASSWORD=secret
12 |
13 | CACHE_DRIVER=file
14 | QUEUE_DRIVER=sync
15 |
--------------------------------------------------------------------------------
/lumen-5.5.0/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor
2 | /.idea
3 | Homestead.json
4 | Homestead.yaml
5 | .env
6 |
--------------------------------------------------------------------------------
/lumen-5.5.0/app/Console/Commands/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/lumen-5.5.0/app/Console/Commands/.gitkeep
--------------------------------------------------------------------------------
/lumen-5.5.0/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | auth = $auth;
26 | }
27 |
28 | /**
29 | * Handle an incoming request.
30 | *
31 | * @param \Illuminate\Http\Request $request
32 | * @param \Closure $next
33 | * @param string|null $guard
34 | * @return mixed
35 | */
36 | public function handle($request, Closure $next, $guard = null)
37 | {
38 | if ($this->auth->guard($guard)->guest()) {
39 | return response('Unauthorized.', 401);
40 | }
41 |
42 | return $next($request);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lumen-5.5.0/app/Http/Middleware/ExampleMiddleware.php:
--------------------------------------------------------------------------------
1 | app['auth']->viaRequest('api', function ($request) {
34 | if ($request->input('api_token')) {
35 | return User::where('api_token', $request->input('api_token'))->first();
36 | }
37 | });
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lumen-5.5.0/app/Providers/EventServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
16 | 'App\Listeners\EventListener',
17 | ],
18 | ];
19 | }
20 |
--------------------------------------------------------------------------------
/lumen-5.5.0/app/User.php:
--------------------------------------------------------------------------------
1 | make(
32 | 'Illuminate\Contracts\Console\Kernel'
33 | );
34 |
35 | exit($kernel->handle(new ArgvInput, new ConsoleOutput));
36 |
--------------------------------------------------------------------------------
/lumen-5.5.0/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "laravel/lumen",
3 | "description": "The Laravel Lumen Framework.",
4 | "keywords": ["framework", "laravel", "lumen"],
5 | "license": "MIT",
6 | "type": "project",
7 | "require": {
8 | "php": ">=5.6.4",
9 | "laravel/lumen-framework": "5.5.*",
10 | "vlucas/phpdotenv": "~2.2"
11 | },
12 | "require-dev": {
13 | "fzaninotto/faker": "~1.4",
14 | "phpunit/phpunit": "~6.0",
15 | "mockery/mockery": "~0.9"
16 | },
17 | "autoload": {
18 | "psr-4": {
19 | "App\\": "app/"
20 | }
21 | },
22 | "autoload-dev": {
23 | "classmap": [
24 | "tests/",
25 | "database/"
26 | ]
27 | },
28 | "scripts": {
29 | "post-root-package-install": [
30 | "php -r \"copy('.env.example', '.env');\""
31 | ]
32 | },
33 | "minimum-stability": "dev",
34 | "prefer-stable": true,
35 | "optimize-autoloader": true
36 | }
37 |
--------------------------------------------------------------------------------
/lumen-5.5.0/database/factories/ModelFactory.php:
--------------------------------------------------------------------------------
1 | define(App\User::class, function (Faker\Generator $faker) {
15 | return [
16 | 'name' => $faker->name,
17 | 'email' => $faker->email,
18 | ];
19 | });
20 |
--------------------------------------------------------------------------------
/lumen-5.5.0/database/migrations/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/lumen-5.5.0/database/migrations/.gitkeep
--------------------------------------------------------------------------------
/lumen-5.5.0/database/seeds/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call('UsersTableSeeder');
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lumen-5.5.0/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 | ./tests
15 |
16 |
17 |
18 |
19 | ./app
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/lumen-5.5.0/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Redirect Trailing Slashes If Not A Folder...
9 | RewriteCond %{REQUEST_FILENAME} !-d
10 | RewriteRule ^(.*)/$ /$1 [L,R=301]
11 |
12 | # Handle Front Controller...
13 | RewriteCond %{REQUEST_FILENAME} !-d
14 | RewriteCond %{REQUEST_FILENAME} !-f
15 | RewriteRule ^ index.php [L]
16 |
17 | # Handle Authorization Header
18 | RewriteCond %{HTTP:Authorization} .
19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
20 |
21 |
--------------------------------------------------------------------------------
/lumen-5.5.0/public/index.php:
--------------------------------------------------------------------------------
1 | run();
29 |
--------------------------------------------------------------------------------
/lumen-5.5.0/readme.md:
--------------------------------------------------------------------------------
1 | # Lumen PHP Framework
2 |
3 | [](https://travis-ci.org/laravel/lumen-framework)
4 | [](https://packagist.org/packages/laravel/lumen-framework)
5 | [](https://packagist.org/packages/laravel/lumen-framework)
6 | [](https://packagist.org/packages/laravel/lumen-framework)
7 | [](https://packagist.org/packages/laravel/lumen-framework)
8 |
9 | Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Lumen attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as routing, database abstraction, queueing, and caching.
10 |
11 | ## Official Documentation
12 |
13 | Documentation for the framework can be found on the [Lumen website](http://lumen.laravel.com/docs).
14 |
15 | ## Security Vulnerabilities
16 |
17 | If you discover a security vulnerability within Lumen, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed.
18 |
19 | ## License
20 |
21 | The Lumen framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
22 |
--------------------------------------------------------------------------------
/lumen-5.5.0/resources/views/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/lumen-5.5.0/resources/views/.gitkeep
--------------------------------------------------------------------------------
/lumen-5.5.0/routes/web.php:
--------------------------------------------------------------------------------
1 | get('/', function () use ($router) {
15 | return "ok";
16 | });
17 |
--------------------------------------------------------------------------------
/lumen-5.5.0/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/lumen-5.5.0/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/lumen-5.5.0/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/lumen-5.5.0/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/lumen-5.5.0/tests/ExampleTest.php:
--------------------------------------------------------------------------------
1 | get('/');
16 |
17 | $this->assertEquals(
18 | $this->app->version(), $this->response->getContent()
19 | );
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/lumen-5.5.0/tests/TestCase.php:
--------------------------------------------------------------------------------
1 | getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
12 |
13 | $app = require __DIR__.'/../src/app.php';
14 | require __DIR__.'/../config/'.$env.'.php';
15 | $console = require __DIR__.'/../src/console.php';
16 | $console->run();
17 |
--------------------------------------------------------------------------------
/silex-2.0.2/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fabpot/silex-skeleton",
3 | "description": "A pre-configured skeleton for the Silex microframework",
4 | "license": "MIT",
5 | "type": "project",
6 | "require": {
7 | "php": ">=5.5.9",
8 | "silex/silex": "~2.0",
9 | "silex/web-profiler": "~2.0",
10 | "symfony/asset": "~2.8|^3.0",
11 | "symfony/browser-kit": "~2.8|^3.0",
12 | "symfony/class-loader": "~2.8|^3.0",
13 | "symfony/config": "~2.8|^3.0",
14 | "symfony/console": "~2.8|^3.0",
15 | "symfony/css-selector": "~2.8|^3.0",
16 | "symfony/debug": "~2.8|^3.0",
17 | "symfony/finder": "~2.8|^3.0",
18 | "symfony/form": "~2.8|^3.0",
19 | "symfony/monolog-bridge": "~2.8|^3.0",
20 | "symfony/process": "~2.8|^3.0",
21 | "symfony/security": "~2.8|^3.0",
22 | "symfony/translation": "~2.8|^3.0",
23 | "symfony/twig-bridge": "~2.8|^3.0",
24 | "symfony/validator": "~2.8|^3.0"
25 | },
26 | "autoload": {
27 | "psr-0": { "": "src/" }
28 | },
29 | "extra": {
30 | "branch-alias": {
31 | "dev-master": "2.0.x-dev"
32 | }
33 | },
34 | "scripts": {
35 | "run": [
36 | "echo 'Started web server on http://localhost:8888'",
37 | "php -S localhost:8888 -t web"
38 | ]
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/silex-2.0.2/config/dev.php:
--------------------------------------------------------------------------------
1 | register(new MonologServiceProvider(), array(
13 | 'monolog.logfile' => __DIR__.'/../var/logs/silex_dev.log',
14 | ));
15 |
16 | $app->register(new WebProfilerServiceProvider(), array(
17 | 'profiler.cache_dir' => __DIR__.'/../var/cache/profiler',
18 | ));
19 |
--------------------------------------------------------------------------------
/silex-2.0.2/config/prod.php:
--------------------------------------------------------------------------------
1 | __DIR__.'/../var/cache/twig');
7 |
--------------------------------------------------------------------------------
/silex-2.0.2/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
18 | src/
19 | tests/
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/silex-2.0.2/src/app.php:
--------------------------------------------------------------------------------
1 | register(new ServiceControllerServiceProvider());
11 | $app->register(new AssetServiceProvider());
12 | $app->register(new TwigServiceProvider());
13 | $app->register(new HttpFragmentServiceProvider());
14 | $app['twig'] = $app->extend('twig', function ($twig, $app) {
15 | // add custom globals, filters, tags, ...
16 |
17 | return $twig;
18 | });
19 |
20 | return $app;
21 |
--------------------------------------------------------------------------------
/silex-2.0.2/src/console.php:
--------------------------------------------------------------------------------
1 | getDefinition()->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The Environment name.', 'dev'));
11 | $console->setDispatcher($app['dispatcher']);
12 | $console
13 | ->register('my-command')
14 | ->setDefinition(array(
15 | // new InputOption('some-option', null, InputOption::VALUE_NONE, 'Some help'),
16 | ))
17 | ->setDescription('My command description')
18 | ->setCode(function (InputInterface $input, OutputInterface $output) use ($app) {
19 | // do something
20 | })
21 | ;
22 |
23 | return $console;
24 |
--------------------------------------------------------------------------------
/silex-2.0.2/src/controllers.php:
--------------------------------------------------------------------------------
1 | get('/', function () use ($app) {
12 | return "ok";
13 | // return $app['twig']->render('index.html.twig', array());
14 | })
15 | ->bind('homepage')
16 | ;
17 |
18 | $app->error(function (\Exception $e, Request $request, $code) use ($app) {
19 | if ($app['debug']) {
20 | return;
21 | }
22 |
23 | // 404.html, or 40x.html, or 4xx.html, or error.html
24 | $templates = array(
25 | 'errors/'.$code.'.html.twig',
26 | 'errors/'.substr($code, 0, 2).'x.html.twig',
27 | 'errors/'.substr($code, 0, 1).'xx.html.twig',
28 | 'errors/default.html.twig',
29 | );
30 |
31 | return new Response($app['twig']->resolveTemplate($templates)->render(array('code' => $code)), $code);
32 | });
33 |
--------------------------------------------------------------------------------
/silex-2.0.2/templates/errors/404.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "layout.html.twig" %}
2 |
3 | {% block content %}
4 | Page not found.
5 | {% endblock %}
6 |
--------------------------------------------------------------------------------
/silex-2.0.2/templates/errors/4xx.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "layout.html.twig" %}
2 |
3 | {% block content %}
4 | An error occurred on the client.
5 | {% endblock %}
6 |
--------------------------------------------------------------------------------
/silex-2.0.2/templates/errors/500.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "layout.html.twig" %}
2 |
3 | {% block content %}
4 | Internal server error.
5 | {% endblock %}
6 |
--------------------------------------------------------------------------------
/silex-2.0.2/templates/errors/5xx.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "layout.html.twig" %}
2 |
3 | {% block content %}
4 | An error occurred on the server.
5 | {% endblock %}
6 |
--------------------------------------------------------------------------------
/silex-2.0.2/templates/errors/default.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "layout.html.twig" %}
2 |
3 | {% block content %}
4 | An error occurred.
5 | {% endblock %}
6 |
--------------------------------------------------------------------------------
/silex-2.0.2/templates/index.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "layout.html.twig" %}
2 |
3 | {% block content %}
4 | Welcome to your new Silex Application!
5 | {% endblock %}
6 |
--------------------------------------------------------------------------------
/silex-2.0.2/templates/layout.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {% block title '' %} - My Silex Application
5 |
6 |
7 |
8 |
19 |
20 |
21 | {% block content %}{% endblock %}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/silex-2.0.2/tests/controllersTest.php:
--------------------------------------------------------------------------------
1 | createClient();
10 | $client->followRedirects(true);
11 | $crawler = $client->request('GET', '/');
12 |
13 | $this->assertTrue($client->getResponse()->isOk());
14 | $this->assertContains('Welcome', $crawler->filter('body')->text());
15 | }
16 |
17 | public function createApplication()
18 | {
19 | $app = require __DIR__.'/../src/app.php';
20 | require __DIR__.'/../config/dev.php';
21 | require __DIR__.'/../src/controllers.php';
22 | $app['session.test'] = true;
23 |
24 | return $this->app = $app;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/silex-2.0.2/var/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/silex-2.0.2/var/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/silex-2.0.2/web/css/main.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/silex-2.0.2/web/css/main.css
--------------------------------------------------------------------------------
/silex-2.0.2/web/index.php:
--------------------------------------------------------------------------------
1 | run();
11 |
--------------------------------------------------------------------------------
/silex-2.0.2/web/index_dev.php:
--------------------------------------------------------------------------------
1 | run();
23 |
--------------------------------------------------------------------------------
/silm-3.1.4/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor/
2 | /logs/*
3 | !/logs/README.md
4 |
--------------------------------------------------------------------------------
/silm-3.1.4/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to Contribute
2 |
3 | ## Pull Requests
4 |
5 | 1. Fork the Slim Skeleton repository
6 | 2. Create a new branch for each feature or improvement
7 | 3. Send a pull request from each feature branch to the **3.x** branch
8 |
9 | It is very important to separate new features or improvements into separate feature branches, and to send a
10 | pull request for each branch. This allows us to review and pull in new features or improvements individually.
11 |
12 | ## Style Guide
13 |
14 | All pull requests must adhere to the [PSR-2 standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md).
15 |
--------------------------------------------------------------------------------
/silm-3.1.4/README.md:
--------------------------------------------------------------------------------
1 | # Slim Framework 3 Skeleton Application
2 |
3 | Use this skeleton application to quickly setup and start working on a new Slim Framework 3 application. This application uses the latest Slim 3 with the PHP-View template renderer. It also uses the Monolog logger.
4 |
5 | This skeleton application was built for Composer. This makes setting up a new Slim Framework application quick and easy.
6 |
7 | ## Install the Application
8 |
9 | Run this command from the directory in which you want to install your new Slim Framework application.
10 |
11 | php composer.phar create-project slim/slim-skeleton [my-app-name]
12 |
13 | Replace `[my-app-name]` with the desired directory name for your new application. You'll want to:
14 |
15 | * Point your virtual host document root to your new application's `public/` directory.
16 | * Ensure `logs/` is web writeable.
17 |
18 | To run the application in development, you can also run this command.
19 |
20 | php composer.phar start
21 |
22 | Run this command to run the test suite
23 |
24 | php composer.phar test
25 |
26 | That's it! Now go build something cool.
27 |
--------------------------------------------------------------------------------
/silm-3.1.4/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "slim/slim-skeleton",
3 | "description": "A Slim Framework skeleton application for rapid development",
4 | "keywords": ["microframework", "rest", "router", "psr7"],
5 | "homepage": "http://github.com/slimphp/Slim-Skeleton",
6 | "license": "MIT",
7 | "authors": [
8 | {
9 | "name": "Josh Lockhart",
10 | "email": "info@joshlockhart.com",
11 | "homepage": "http://www.joshlockhart.com/"
12 | }
13 | ],
14 | "require": {
15 | "php": ">=5.5.0",
16 | "slim/slim": "^3.1",
17 | "slim/php-view": "^2.0",
18 | "monolog/monolog": "^1.17"
19 | },
20 | "require-dev": {
21 | "phpunit/phpunit": ">=4.8 < 6.0"
22 | },
23 | "autoload-dev": {
24 | "psr-4": {
25 | "Tests\\": "tests/"
26 | }
27 | },
28 | "config": {
29 | "process-timeout" : 0
30 | },
31 | "scripts": {
32 | "start": "php -S localhost:8080 -t public public/index.php",
33 | "test": "phpunit"
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/silm-3.1.4/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 |
3 | volumes:
4 | logs:
5 | driver: local
6 |
7 | services:
8 | slim:
9 | image: php:7-alpine
10 | working_dir: /var/www
11 | command: php -S 0.0.0.0:8080 -t public public/index.php
12 | environment:
13 | docker: "true"
14 | ports:
15 | - 8080:8080
16 | volumes:
17 | - .:/var/www
18 | - logs:/var/www/logs
19 |
--------------------------------------------------------------------------------
/silm-3.1.4/logs/README.md:
--------------------------------------------------------------------------------
1 | Your Slim Framework application's log files will be written to this directory.
2 |
--------------------------------------------------------------------------------
/silm-3.1.4/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | tests
5 |
6 |
7 |
--------------------------------------------------------------------------------
/silm-3.1.4/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | RewriteEngine On
3 |
4 | # Some hosts may require you to use the `RewriteBase` directive.
5 | # Determine the RewriteBase automatically and set it as environment variable.
6 | # If you are using Apache aliases to do mass virtual hosting or installed the
7 | # project in a subdirectory, the base path will be prepended to allow proper
8 | # resolution of the index.php file and to redirect to the correct URI. It will
9 | # work in environments without path prefix as well, providing a safe, one-size
10 | # fits all solution. But as you do not need it in this case, you can comment
11 | # the following 2 lines to eliminate the overhead.
12 | RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
13 | RewriteRule ^(.*) - [E=BASE:%1]
14 |
15 | # If the above doesn't work you might need to set the `RewriteBase` directive manually, it should be the
16 | # absolute physical path to the directory that contains this htaccess file.
17 | # RewriteBase /
18 |
19 | RewriteCond %{REQUEST_FILENAME} !-f
20 | RewriteRule ^ index.php [QSA,L]
21 |
22 |
--------------------------------------------------------------------------------
/silm-3.1.4/public/index.php:
--------------------------------------------------------------------------------
1 | run();
31 |
--------------------------------------------------------------------------------
/silm-3.1.4/src/dependencies.php:
--------------------------------------------------------------------------------
1 | getContainer();
5 |
6 | // view renderer
7 | $container['renderer'] = function ($c) {
8 | $settings = $c->get('settings')['renderer'];
9 | return new Slim\Views\PhpRenderer($settings['template_path']);
10 | };
11 |
12 | // monolog
13 | $container['logger'] = function ($c) {
14 | $settings = $c->get('settings')['logger'];
15 | $logger = new Monolog\Logger($settings['name']);
16 | $logger->pushProcessor(new Monolog\Processor\UidProcessor());
17 | $logger->pushHandler(new Monolog\Handler\StreamHandler($settings['path'], $settings['level']));
18 | return $logger;
19 | };
20 |
--------------------------------------------------------------------------------
/silm-3.1.4/src/middleware.php:
--------------------------------------------------------------------------------
1 | add(new \Slim\Csrf\Guard);
5 |
--------------------------------------------------------------------------------
/silm-3.1.4/src/routes.php:
--------------------------------------------------------------------------------
1 | get('/[{name}]', function (Request $request, Response $response, array $args) {
9 | // Sample log message
10 | // $this->logger->info("Slim-Skeleton '/' route");
11 |
12 | return "ok";
13 | // Render index view
14 | // return $this->renderer->render($response, 'index.phtml', $args);
15 | });
16 |
--------------------------------------------------------------------------------
/silm-3.1.4/src/settings.php:
--------------------------------------------------------------------------------
1 | [
4 | 'displayErrorDetails' => true, // set to false in production
5 | 'addContentLengthHeader' => false, // Allow the web server to send the content-length header
6 |
7 | // Renderer settings
8 | 'renderer' => [
9 | 'template_path' => __DIR__ . '/../templates/',
10 | ],
11 |
12 | // Monolog settings
13 | 'logger' => [
14 | 'name' => 'slim-app',
15 | 'path' => isset($_ENV['docker']) ? 'php://stdout' : __DIR__ . '/../logs/app.log',
16 | 'level' => \Monolog\Logger::DEBUG,
17 | ],
18 | ],
19 | ];
20 |
--------------------------------------------------------------------------------
/silm-3.1.4/templates/index.phtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Slim 3
6 |
7 |
27 |
28 |
29 | Slim
30 | a microframework for PHP
31 |
32 |
33 | Hello = htmlspecialchars($name); ?>!
34 |
35 | Try SlimFramework
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/silm-3.1.4/tests/Functional/BaseTestCase.php:
--------------------------------------------------------------------------------
1 | $requestMethod,
39 | 'REQUEST_URI' => $requestUri
40 | ]
41 | );
42 |
43 | // Set up a request object based on the environment
44 | $request = Request::createFromEnvironment($environment);
45 |
46 | // Add request data, if it exists
47 | if (isset($requestData)) {
48 | $request = $request->withParsedBody($requestData);
49 | }
50 |
51 | // Set up a response object
52 | $response = new Response();
53 |
54 | // Use the application settings
55 | $settings = require __DIR__ . '/../../src/settings.php';
56 |
57 | // Instantiate the application
58 | $app = new App($settings);
59 |
60 | // Set up dependencies
61 | require __DIR__ . '/../../src/dependencies.php';
62 |
63 | // Register middleware
64 | if ($this->withMiddleware) {
65 | require __DIR__ . '/../../src/middleware.php';
66 | }
67 |
68 | // Register routes
69 | require __DIR__ . '/../../src/routes.php';
70 |
71 | // Process the application
72 | $response = $app->process($request, $response);
73 |
74 | // Return the response
75 | return $response;
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/silm-3.1.4/tests/Functional/HomepageTest.php:
--------------------------------------------------------------------------------
1 | runApp('GET', '/');
13 |
14 | $this->assertEquals(200, $response->getStatusCode());
15 | $this->assertContains('SlimFramework', (string)$response->getBody());
16 | $this->assertNotContains('Hello', (string)$response->getBody());
17 | }
18 |
19 | /**
20 | * Test that the index route with optional name argument returns a rendered greeting
21 | */
22 | public function testGetHomepageWithGreeting()
23 | {
24 | $response = $this->runApp('GET', '/name');
25 |
26 | $this->assertEquals(200, $response->getStatusCode());
27 | $this->assertContains('Hello name!', (string)$response->getBody());
28 | }
29 |
30 | /**
31 | * Test that the index route won't accept a post request
32 | */
33 | public function testPostHomepageNotAllowed()
34 | {
35 | $response = $this->runApp('POST', '/', ['test']);
36 |
37 | $this->assertEquals(405, $response->getStatusCode());
38 | $this->assertContains('Method not allowed', (string)$response->getBody());
39 | }
40 | }
--------------------------------------------------------------------------------
/symfony-3.3.10/.gitignore:
--------------------------------------------------------------------------------
1 | /.web-server-pid
2 | /app/config/parameters.yml
3 | /build/
4 | /phpunit.xml
5 | /var/*
6 | !/var/cache
7 | /var/cache/*
8 | !var/cache/.gitkeep
9 | !/var/logs
10 | /var/logs/*
11 | !var/logs/.gitkeep
12 | !/var/sessions
13 | /var/sessions/*
14 | !var/sessions/.gitkeep
15 | !var/SymfonyRequirements.php
16 | /vendor/
17 | /web/bundles/
18 |
--------------------------------------------------------------------------------
/symfony-3.3.10/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2004-2017 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 |
--------------------------------------------------------------------------------
/symfony-3.3.10/app/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | Require all denied
3 |
4 |
5 | Order deny,allow
6 | Deny from all
7 |
8 |
--------------------------------------------------------------------------------
/symfony-3.3.10/app/AppCache.php:
--------------------------------------------------------------------------------
1 | getEnvironment(), ['dev', 'test'], true)) {
22 | $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
23 | $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
24 | $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
25 |
26 | if ('dev' === $this->getEnvironment()) {
27 | $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
28 | $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
29 | }
30 | }
31 |
32 | return $bundles;
33 | }
34 |
35 | public function getRootDir()
36 | {
37 | return __DIR__;
38 | }
39 |
40 | public function getCacheDir()
41 | {
42 | return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
43 | }
44 |
45 | public function getLogDir()
46 | {
47 | return dirname(__DIR__).'/var/logs';
48 | }
49 |
50 | public function registerContainerConfiguration(LoaderInterface $loader)
51 | {
52 | $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/symfony-3.3.10/app/Resources/views/base.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {% block title %}Welcome!{% endblock %}
6 | {% block stylesheets %}{% endblock %}
7 |
8 |
9 |
10 | {% block body %}{% endblock %}
11 | {% block javascripts %}{% endblock %}
12 |
13 |
14 |
--------------------------------------------------------------------------------
/symfony-3.3.10/app/config/config.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: parameters.yml }
3 | - { resource: security.yml }
4 | - { resource: services.yml }
5 |
6 | # Put parameters here that don't need to change on each machine where the app is deployed
7 | # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
8 | parameters:
9 | locale: en
10 |
11 | framework:
12 | #esi: ~
13 | #translator: { fallbacks: ['%locale%'] }
14 | secret: '%secret%'
15 | router:
16 | resource: '%kernel.project_dir%/app/config/routing.yml'
17 | strict_requirements: ~
18 | form: ~
19 | csrf_protection: ~
20 | validation: { enable_annotations: true }
21 | #serializer: { enable_annotations: true }
22 | templating:
23 | engines: ['twig']
24 | default_locale: '%locale%'
25 | trusted_hosts: ~
26 | session:
27 | # https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
28 | handler_id: session.handler.native_file
29 | save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
30 | fragments: ~
31 | http_method_override: true
32 | assets: ~
33 | php_errors:
34 | log: true
35 |
36 | # Twig Configuration
37 | twig:
38 | debug: '%kernel.debug%'
39 | strict_variables: '%kernel.debug%'
40 |
41 | # Doctrine Configuration
42 | doctrine:
43 | dbal:
44 | driver: pdo_mysql
45 | host: '%database_host%'
46 | port: '%database_port%'
47 | dbname: '%database_name%'
48 | user: '%database_user%'
49 | password: '%database_password%'
50 | charset: UTF8
51 | # if using pdo_sqlite as your database driver:
52 | # 1. add the path in parameters.yml
53 | # e.g. database_path: '%kernel.project_dir%/var/data/data.sqlite'
54 | # 2. Uncomment database_path in parameters.yml.dist
55 | # 3. Uncomment next line:
56 | #path: '%database_path%'
57 |
58 | orm:
59 | auto_generate_proxy_classes: '%kernel.debug%'
60 | naming_strategy: doctrine.orm.naming_strategy.underscore
61 | auto_mapping: true
62 |
63 | # Swiftmailer Configuration
64 | swiftmailer:
65 | transport: '%mailer_transport%'
66 | host: '%mailer_host%'
67 | username: '%mailer_user%'
68 | password: '%mailer_password%'
69 | spool: { type: memory }
70 |
--------------------------------------------------------------------------------
/symfony-3.3.10/app/config/config_dev.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: config.yml }
3 |
4 | framework:
5 | router:
6 | resource: '%kernel.project_dir%/app/config/routing_dev.yml'
7 | strict_requirements: true
8 | profiler: { only_exceptions: false }
9 |
10 | web_profiler:
11 | toolbar: true
12 | intercept_redirects: false
13 |
14 | monolog:
15 | handlers:
16 | main:
17 | type: stream
18 | path: '%kernel.logs_dir%/%kernel.environment%.log'
19 | level: debug
20 | channels: ['!event']
21 | console:
22 | type: console
23 | process_psr_3_messages: false
24 | channels: ['!event', '!doctrine', '!console']
25 | # To follow logs in real time, execute the following command:
26 | # `bin/console server:log -vv`
27 | server_log:
28 | type: server_log
29 | process_psr_3_messages: false
30 | host: 127.0.0.1:9911
31 | # uncomment to get logging in your browser
32 | # you may have to allow bigger header sizes in your Web server configuration
33 | #firephp:
34 | # type: firephp
35 | # level: info
36 | #chromephp:
37 | # type: chromephp
38 | # level: info
39 |
40 | #swiftmailer:
41 | # delivery_addresses: ['me@example.com']
42 |
--------------------------------------------------------------------------------
/symfony-3.3.10/app/config/config_prod.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: config.yml }
3 |
4 | #doctrine:
5 | # orm:
6 | # metadata_cache_driver: apc
7 | # result_cache_driver: apc
8 | # query_cache_driver: apc
9 |
10 | monolog:
11 | handlers:
12 | main:
13 | type: fingers_crossed
14 | action_level: error
15 | handler: nested
16 | nested:
17 | type: stream
18 | path: '%kernel.logs_dir%/%kernel.environment%.log'
19 | level: debug
20 | console:
21 | type: console
22 | process_psr_3_messages: false
23 |
--------------------------------------------------------------------------------
/symfony-3.3.10/app/config/config_test.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: config_dev.yml }
3 |
4 | framework:
5 | test: ~
6 | session:
7 | storage_id: session.storage.mock_file
8 | profiler:
9 | collect: false
10 |
11 | web_profiler:
12 | toolbar: false
13 | intercept_redirects: false
14 |
15 | swiftmailer:
16 | disable_delivery: true
17 |
--------------------------------------------------------------------------------
/symfony-3.3.10/app/config/parameters.yml.dist:
--------------------------------------------------------------------------------
1 | # This file is a "template" of what your parameters.yml file should look like
2 | # Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production.
3 | # https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
4 | parameters:
5 | database_host: 127.0.0.1
6 | database_port: ~
7 | database_name: symfony
8 | database_user: root
9 | database_password: ~
10 | # You should uncomment this if you want to use pdo_sqlite
11 | #database_path: '%kernel.project_dir%/var/data/data.sqlite'
12 |
13 | mailer_transport: smtp
14 | mailer_host: 127.0.0.1
15 | mailer_user: ~
16 | mailer_password: ~
17 |
18 | # A secret key that's used to generate certain security-related tokens
19 | secret: ThisTokenIsNotSoSecretChangeIt
20 |
--------------------------------------------------------------------------------
/symfony-3.3.10/app/config/routing.yml:
--------------------------------------------------------------------------------
1 | app:
2 | resource: '@AppBundle/Controller/'
3 | type: annotation
4 |
--------------------------------------------------------------------------------
/symfony-3.3.10/app/config/routing_dev.yml:
--------------------------------------------------------------------------------
1 | _wdt:
2 | resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
3 | prefix: /_wdt
4 |
5 | _profiler:
6 | resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
7 | prefix: /_profiler
8 |
9 | _errors:
10 | resource: '@TwigBundle/Resources/config/routing/errors.xml'
11 | prefix: /_error
12 |
13 | _main:
14 | resource: routing.yml
15 |
--------------------------------------------------------------------------------
/symfony-3.3.10/app/config/security.yml:
--------------------------------------------------------------------------------
1 | # To get started with security, check out the documentation:
2 | # https://symfony.com/doc/current/security.html
3 | security:
4 |
5 | # https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded
6 | providers:
7 | in_memory:
8 | memory: ~
9 |
10 | firewalls:
11 | # disables authentication for assets and the profiler, adapt it according to your needs
12 | dev:
13 | pattern: ^/(_(profiler|wdt)|css|images|js)/
14 | security: false
15 |
16 | main:
17 | anonymous: ~
18 | # activate different ways to authenticate
19 |
20 | # https://symfony.com/doc/current/security.html#a-configuring-how-your-users-will-authenticate
21 | #http_basic: ~
22 |
23 | # https://symfony.com/doc/current/security/form_login_setup.html
24 | #form_login: ~
25 |
--------------------------------------------------------------------------------
/symfony-3.3.10/app/config/services.yml:
--------------------------------------------------------------------------------
1 | # Learn more about services, parameters and containers at
2 | # https://symfony.com/doc/current/service_container.html
3 | parameters:
4 | #parameter_name: value
5 |
6 | services:
7 | # default configuration for services in *this* file
8 | _defaults:
9 | # automatically injects dependencies in your services
10 | autowire: true
11 | # automatically registers your services as commands, event subscribers, etc.
12 | autoconfigure: true
13 | # this means you cannot fetch services directly from the container via $container->get()
14 | # if you need to do this, you can override this setting on individual services
15 | public: false
16 |
17 | # makes classes in src/AppBundle available to be used as services
18 | # this creates a service per class whose id is the fully-qualified class name
19 | AppBundle\:
20 | resource: '../../src/AppBundle/*'
21 | # you can exclude directories or files
22 | # but if a service is unused, it's removed anyway
23 | exclude: '../../src/AppBundle/{Entity,Repository,Tests}'
24 |
25 | # controllers are imported separately to make sure they're public
26 | # and have a tag that allows actions to type-hint services
27 | AppBundle\Controller\:
28 | resource: '../../src/AppBundle/Controller'
29 | public: true
30 | tags: ['controller.service_arguments']
31 |
32 | # add more services, or override services that need manual wiring
33 | # AppBundle\Service\ExampleService:
34 | # arguments:
35 | # $someArgument: 'some_value'
36 |
--------------------------------------------------------------------------------
/symfony-3.3.10/bin/console:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
19 | $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
20 |
21 | if ($debug) {
22 | Debug::enable();
23 | }
24 |
25 | $kernel = new AppKernel($env, $debug);
26 | $application = new Application($kernel);
27 | $application->run($input);
28 |
--------------------------------------------------------------------------------
/symfony-3.3.10/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/framework-standard-edition",
3 | "license": "MIT",
4 | "type": "project",
5 | "description": "The \"Symfony Standard Edition\" distribution",
6 | "autoload": {
7 | "psr-4": {
8 | "AppBundle\\": "src/AppBundle"
9 | },
10 | "classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
11 | },
12 | "autoload-dev": {
13 | "psr-4": { "Tests\\": "tests/" },
14 | "files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
15 | },
16 | "require": {
17 | "php": ">=5.5.9",
18 | "doctrine/doctrine-bundle": "^1.6",
19 | "doctrine/orm": "^2.5",
20 | "incenteev/composer-parameter-handler": "^2.0",
21 | "sensio/distribution-bundle": "^5.0.19",
22 | "sensio/framework-extra-bundle": "^3.0.2",
23 | "symfony/monolog-bundle": "^3.1.0",
24 | "symfony/polyfill-apcu": "^1.0",
25 | "symfony/swiftmailer-bundle": "^2.3.10",
26 | "symfony/symfony": "3.3.*",
27 | "twig/twig": "^1.0||^2.0"
28 | },
29 | "require-dev": {
30 | "sensio/generator-bundle": "^3.0",
31 | "symfony/phpunit-bridge": "^3.0"
32 | },
33 | "scripts": {
34 | "symfony-scripts": [
35 | "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
36 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
37 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
38 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
39 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
40 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
41 | ],
42 | "post-install-cmd": [
43 | "@symfony-scripts"
44 | ],
45 | "post-update-cmd": [
46 | "@symfony-scripts"
47 | ]
48 | },
49 | "config": {
50 | "platform": {
51 | "php": "5.5.9"
52 | },
53 | "sort-packages": true
54 | },
55 | "extra": {
56 | "symfony-app-dir": "app",
57 | "symfony-bin-dir": "bin",
58 | "symfony-var-dir": "var",
59 | "symfony-web-dir": "web",
60 | "symfony-tests-dir": "tests",
61 | "symfony-assets-install": "relative",
62 | "incenteev-parameters": {
63 | "file": "app/config/parameters.yml"
64 | },
65 | "branch-alias": {
66 | "dev-master": "3.3-dev"
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/symfony-3.3.10/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | tests
18 |
19 |
20 |
21 |
22 |
23 | src
24 |
25 | src/*Bundle/Resources
26 | src/*/*Bundle/Resources
27 | src/*/Bundle/*Bundle/Resources
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/symfony-3.3.10/src/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | Require all denied
3 |
4 |
5 | Order deny,allow
6 | Deny from all
7 |
8 |
--------------------------------------------------------------------------------
/symfony-3.3.10/src/AppBundle/AppBundle.php:
--------------------------------------------------------------------------------
1 | render('default/index.html.twig', [
20 | // 'base_dir' => realpath($this->getParameter('kernel.project_dir')).DIRECTORY_SEPARATOR,
21 | // ]);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/symfony-3.3.10/tests/AppBundle/Controller/DefaultControllerTest.php:
--------------------------------------------------------------------------------
1 | request('GET', '/');
14 |
15 | $this->assertEquals(200, $client->getResponse()->getStatusCode());
16 | $this->assertContains('Welcome to Symfony', $crawler->filter('#container h1')->text());
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/symfony-3.3.10/var/cache/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/symfony-3.3.10/var/cache/.gitkeep
--------------------------------------------------------------------------------
/symfony-3.3.10/var/logs/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/symfony-3.3.10/var/logs/.gitkeep
--------------------------------------------------------------------------------
/symfony-3.3.10/var/sessions/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/symfony-3.3.10/var/sessions/.gitkeep
--------------------------------------------------------------------------------
/symfony-3.3.10/web/app.php:
--------------------------------------------------------------------------------
1 | loadClassCache();
13 | }
14 | //$kernel = new AppCache($kernel);
15 |
16 | // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
17 | //Request::enableHttpMethodParameterOverride();
18 | $request = Request::createFromGlobals();
19 | $response = $kernel->handle($request);
20 | $response->send();
21 | $kernel->terminate($request, $response);
22 |
--------------------------------------------------------------------------------
/symfony-3.3.10/web/app_dev.php:
--------------------------------------------------------------------------------
1 | loadClassCache();
27 | }
28 | $request = Request::createFromGlobals();
29 | $response = $kernel->handle($request);
30 | $response->send();
31 | $kernel->terminate($request, $response);
32 |
--------------------------------------------------------------------------------
/symfony-3.3.10/web/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/symfony-3.3.10/web/apple-touch-icon.png
--------------------------------------------------------------------------------
/symfony-3.3.10/web/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/symfony-3.3.10/web/favicon.ico
--------------------------------------------------------------------------------
/symfony-3.3.10/web/robots.txt:
--------------------------------------------------------------------------------
1 | # www.robotstxt.org/
2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449
3 |
4 | User-agent: *
5 | Disallow:
6 |
--------------------------------------------------------------------------------
/tastphp-1.3.6/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | vendor/
3 | config/app.yml
4 | config/parameters.yml
5 | config/db.yml
6 | config/listeners.yml
7 | var/cache
8 | var/logs
9 | build/
--------------------------------------------------------------------------------
/tastphp-1.3.6/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 | php:
3 | - '7.0'
4 | - '7.1'
5 |
6 | sudo: required
7 |
8 | env:
9 | - DB=mysql
10 |
11 | install:
12 | - composer install --dev
13 |
14 | services:
15 | - redis-server
16 | before_install:
17 | - phpenv config-rm xdebug.ini
18 | - echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
19 | - if [[ "$DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS tastphp_demo;" -uroot; fi
20 | script:
21 | - ./vendor/bin/phpunit
22 | after_script:
23 | - ./vendor/bin/test-reporter
24 |
--------------------------------------------------------------------------------
/tastphp-1.3.6/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/tastphp-1.3.6/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | ## About Tastphp
15 |
16 | Tastphp is a **PHP framework** for **the modern developer**. Tastphp is used by some web application (like clothesmake.com)
17 |
18 | > Tastphp core visit this [Framework Repository](https://github.com/tastphp/framework).
19 |
20 |
21 |
22 | ## Installation
23 |
24 |
25 | use [tastphp-installer](https://github.com/tastphp/tastphp-installer)
26 |
27 | or use composer command:
28 |
29 | ```
30 | composer create-project --prefer-dist tast-php/tast-php {your install directory} "1.3.4"
31 | ```
32 |
33 |
34 | ## Features
35 | * Symfony Style
36 | * Dependency Injection Container.
37 | * M(Service/Dao)VC Architecture
38 | * Router
39 | * Twig
40 | * Console Support
41 | * Debug Bar
42 | * DBAL
43 | * Migrations
44 | * EventDispatcher
45 | * Mysql (master/slave - write/read split)
46 | * Queue
47 | * Cache
48 | * JWT
49 | * Mail
50 | * CsrfToken
51 | * ...
52 |
53 | ## Requirements
54 |
55 | * PHP 7+
56 |
57 | ## Documentation
58 |
59 | * [中文](https://docs.tastphp.com/zh/)
60 | * [English](https://docs.tastphp.com/en/)
61 |
62 |
63 | ## Related Projects
64 |
65 | * [tastphp-docs](https://github.com/tastphp/tastphp-docs): tastphp documents
66 | * [tastphp-swoole](https://github.com/tastphp/tastphp-swoole) : tastphp swoole branch
67 | * [tastphp-installer](https://github.com/tastphp/installer): tastphp install tool
68 |
69 | ## License
70 | The Tastphp framework is open-sourced software licensed under the [MIT Licensed](http://www.opensource.org/licenses/MIT)
71 |
--------------------------------------------------------------------------------
/tastphp-1.3.6/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-cayman
--------------------------------------------------------------------------------
/tastphp-1.3.6/bin/console:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | setCatchExceptions(true);
28 |
29 | $helperSet = new Console\Helper\HelperSet();
30 | $helperSet->set(new QuestionHelper(), 'question');
31 | $cli->setHelperSet($helperSet);
32 |
33 | $commands = [];
34 | $commands[] = new MigrationsCommand\ExecuteCommand();
35 | $commands[] = new MigrationsCommand\GenerateCommand();
36 | $commands[] = new MigrationsCommand\LatestCommand();
37 | $commands[] = new MigrationsCommand\MigrateCommand();
38 | $commands[] = new MigrationsCommand\StatusCommand();
39 | $commands[] = new MigrationsCommand\VersionCommand();
40 | $commands[] = new \TastPHP\Framework\Console\Command\GenerateEntityServiceCommand();
41 | $commands[] = new \TastPHP\Framework\Console\Command\GenerateServiceCommand();
42 | $commands[] = new \TastPHP\Framework\Console\Command\GenerateBundleCommand();
43 | $commands[] = new \TastPHP\Framework\Console\Command\CacheConfigCommand();
44 | $commands[] = new \TastPHP\Framework\Console\Command\CacheRouteCommand();
45 |
46 | $cli->addCommands($commands);
47 |
48 | $cli->run();
--------------------------------------------------------------------------------
/tastphp-1.3.6/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tast-php/tast-php",
3 | "description": "The TastPHP Framework",
4 | "keywords": [
5 | "tast",
6 | "php",
7 | "framework"
8 | ],
9 | "homepage": "https://github.com/tastphp/tastphp",
10 | "license": "MIT",
11 | "authors": [
12 | {
13 | "name": "xujiajun",
14 | "email": "me@xujiajun.cn",
15 | "homepage": "http://xujiajun.cn"
16 | }
17 | ],
18 | "autoload": {
19 | "psr-4": {
20 | "TastPHP\\": [
21 | "src/"
22 | ]
23 | }
24 | },
25 | "autoload-dev": {
26 | "psr-4": {
27 | "TastPHP\\Tests\\": "tests/src"
28 | }
29 | },
30 | "require": {
31 | "tastphp/framework": "~1.7"
32 | },
33 | "require-dev": {
34 | "phpunit/phpunit": "5.5.*"
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/tastphp-1.3.6/config/config.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - { resource: app.yml, name: app }
3 | - { resource: parameters.yml,name: parameters }
4 | #business logic config
5 | business_config:
6 | front_config:
7 | resource: FrontBundle/Config/config.yml
8 | common_config:
9 | resource: Common/Config/config.yml
--------------------------------------------------------------------------------
/tastphp-1.3.6/config/example.app.yml:
--------------------------------------------------------------------------------
1 | version: v1.3.5
2 | debug: true
3 | secret: tastphp
4 | # dev | test | prod
5 | env: dev
6 | timezone: UTC
7 | name: tastphp
--------------------------------------------------------------------------------
/tastphp-1.3.6/config/example.dbs.yml:
--------------------------------------------------------------------------------
1 | dbs.options:
2 | master:
3 | driver: pdo_mysql
4 | host: 127.0.0.1
5 | password:
6 | user: root
7 | dbname: tastphp
8 | charset: utf8mb4
9 | slave1:
10 | driver: pdo_mysql
11 | host: 127.0.0.1
12 | user: root
13 | password:
14 | dbname: tastphp
15 | charset: utf8mb4
--------------------------------------------------------------------------------
/tastphp-1.3.6/config/example.listeners.yml:
--------------------------------------------------------------------------------
1 | front:
2 | resource: FrontBundle/Config/listeners.yml
--------------------------------------------------------------------------------
/tastphp-1.3.6/config/example.migrations-db.php:
--------------------------------------------------------------------------------
1 | 'test',
5 | 'user' => 'root',
6 | 'password' => '',
7 | 'host' => '127.0.0.1',
8 | 'driver' => 'pdo_mysql',
9 | 'charset' => 'utf8mb4'
10 | ];
--------------------------------------------------------------------------------
/tastphp-1.3.6/config/example.parameters.yml:
--------------------------------------------------------------------------------
1 | #csrf change it
2 | csrf.secret: tastphp.token
3 | csrf.ttl: 1440
4 |
5 | #swift mail
6 | swift.mail.host: hwsmtp.exmail.qq.com
7 | swift.mail.port: 25
8 | # change it
9 | swift.mail.username: xxx
10 | swift.mail.password: xxx
11 | swift.mail.enabled: on
12 |
13 | #beanstalkd # change it
14 | beanstalkd.host: 127.0.0.1
15 | tube: tastphpframework
--------------------------------------------------------------------------------
/tastphp-1.3.6/config/migrations.yml:
--------------------------------------------------------------------------------
1 | name: DBAL Migrations
2 | migrations_namespace: Migrations
3 | table_name: migration_versions
4 | migrations_directory: '/../migrations'
--------------------------------------------------------------------------------
/tastphp-1.3.6/config/routes.yml:
--------------------------------------------------------------------------------
1 | # for production
2 | FrontBundle:
3 | resource: FrontBundle/Config/routes.yml
--------------------------------------------------------------------------------
/tastphp-1.3.6/config/routes_test.yml:
--------------------------------------------------------------------------------
1 | #for test
2 | FrontBundle_test:
3 | resource: FrontBundle/Config/routes_test.yml
--------------------------------------------------------------------------------
/tastphp-1.3.6/docs/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/tastphp-1.3.6/docs/.gitkeep
--------------------------------------------------------------------------------
/tastphp-1.3.6/docs/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Release Notes
2 |
3 | ## v1.3.6 (2017.10.20)
4 | * modify composer.lock
5 |
6 | ## v1.3.5 (2017.10.20)
7 | ### Added
8 | * CacheConfigCommand && CacheRouteCommand
9 | * default register twig
10 |
11 | ## v1.3.4 (2017.10.12)
12 | * change Tastphp core Framework version to ~1.7
13 |
14 | ## v1.3.3 (2017.10.12)
15 | * remove console GenerateAdminController & GenerateAdminRoutes Command
16 |
17 | ## v1.3.2 (2017.7.31)
18 | * Change console.php to console
19 | * compatible no config file
20 |
21 | ## v1.3.1 (2017.7.13)
22 | * modify app example version
23 | ## v1.3.0 (2017.7.13)
24 | ### Added
25 | * support psr-11 and psr-7
26 | * Fixed some issues
27 |
28 | ## v1.2.0
29 | ### Fixed
30 | * Fixed some bugs
--------------------------------------------------------------------------------
/tastphp-1.3.6/migrations/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/tastphp-1.3.6/migrations/.gitkeep
--------------------------------------------------------------------------------
/tastphp-1.3.6/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ./tests/
5 |
6 |
7 |
8 |
9 | ./src/
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tastphp-1.3.6/src/App/AppKernel.php:
--------------------------------------------------------------------------------
1 | replaceListener(AppEvent::REQUEST,RequestListener::class.'@onRequestAction');
16 | // $this->replaceListener(AppEvent::MIDDLEWARE,MiddlewareListener::class.'@onMiddlewareAction');
17 | // $this->registerTwigService();
18 | parent::__construct($values);
19 | }
20 |
21 | }
--------------------------------------------------------------------------------
/tastphp-1.3.6/src/Common/Config/config.yml:
--------------------------------------------------------------------------------
1 | #just demo
2 | demo_user_role: { 0: admin, 1: guest}
--------------------------------------------------------------------------------
/tastphp-1.3.6/src/Common/Kit/Validator.php:
--------------------------------------------------------------------------------
1 | 2, 'maxLength' => 18),
37 | $option
38 | );
39 |
40 | $len = (strlen($value) + mb_strlen($value, 'utf-8')) / 2;
41 | if ($len > $option['maxLength'] || $len < $option['minLength']) {
42 | return false;
43 | }
44 | return !!preg_match('/^[\x{4e00}-\x{9fa5}a-zA-z0-9_.]+$/u', $value);
45 | }
46 |
47 | public static function password($value)
48 | {
49 | return !!preg_match('/^[\S]{5,20}$/u', $value);
50 | }
51 |
52 | public static function integer($value)
53 | {
54 | return !!preg_match('/^[+-]?\d{1,9}$/', $value);
55 | }
56 |
57 | public static function float($value)
58 | {
59 | return !!preg_match('/^(([+-]?[1-9]{1}\d*)|([+-]?[0]{1}))(\.(\d){1,2})?$/i', $value);
60 | }
61 |
62 | public static function date($value)
63 | {
64 | return !!preg_match('/^(\d{4}|\d{2})-((0?([1-9]))|(1[0-2]))-((0?[1-9])|([12]([0-9]))|(3[0|1]))$/', $value);
65 | }
66 | }
--------------------------------------------------------------------------------
/tastphp-1.3.6/src/FrontBundle/Config/listeners.yml:
--------------------------------------------------------------------------------
1 | app.foo:
2 | event: app.foo
3 | listener: TastPHP\FrontBundle\Listener\FooListener
4 | callback: onFooAction
5 | priority: 0
--------------------------------------------------------------------------------
/tastphp-1.3.6/src/FrontBundle/Config/routes.yml:
--------------------------------------------------------------------------------
1 | home:
2 | pattern: /
3 | parameters:
4 | _controller: Front@Home::index
5 | methods: [GET]
6 | routeName: home
7 | home:
8 | pattern: /
9 | parameters:
10 | _controller: Front@Home::index
11 | methods: [GET]
12 | routeName: home
--------------------------------------------------------------------------------
/tastphp-1.3.6/src/FrontBundle/Controller/HomeController.php:
--------------------------------------------------------------------------------
1 | render('home/index.html.twig');
14 | }
15 | }
--------------------------------------------------------------------------------
/tastphp-1.3.6/src/FrontBundle/Listener/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/tastphp-1.3.6/src/FrontBundle/Listener/.gitkeep
--------------------------------------------------------------------------------
/tastphp-1.3.6/src/FrontBundle/Listener/FooListener.php:
--------------------------------------------------------------------------------
1 | container = $container;
11 | }
12 |
13 | public function getFunctions()
14 | {
15 | return [
16 | new \Twig_SimpleFunction('debug', [$this, 'debug'], ['is_safe' => ['html']]),
17 | new \Twig_SimpleFunction('debugScript', [$this, 'debugScript'], ['is_safe' => ['html']]),
18 | new \Twig_SimpleFunction('debugCss', [$this, 'debugCss'], ['is_safe' => ['html']])
19 | ];
20 | }
21 |
22 | public function debug()
23 | {
24 | $debugBarRenderer = $this->container->singleton('debugbar')->getJavascriptRenderer();
25 | return $debugBarRenderer->render();
26 | }
27 |
28 | public function debugScript()
29 | {
30 | $debugBarRenderer = $this->container->singleton('debugbar')->getJavascriptRenderer();
31 | return $debugBarRenderer->dumpJsAssets();
32 | }
33 |
34 | public function debugCss()
35 | {
36 | $debugBarRenderer = $this->container->singleton('debugbar')->getJavascriptRenderer();
37 | return $debugBarRenderer->dumpCssAssets();
38 | }
39 |
40 | public function getName()
41 | {
42 | return 'web_twig_extension';
43 | }
44 | }
--------------------------------------------------------------------------------
/tastphp-1.3.6/src/Service/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/tastphp-1.3.6/src/Service/.gitkeep
--------------------------------------------------------------------------------
/tastphp-1.3.6/src/Service/Common/BaseService.php:
--------------------------------------------------------------------------------
1 | getKernel()->registerDao($name);
11 | }
12 |
13 | public function registerService($name)
14 | {
15 | return $this->getKernel()->registerService($name);
16 | }
17 |
18 | public function getIp()
19 | {
20 | $container = $this->getKernel()->getContainer();
21 | return json_encode($container['Request']->getClientIps());
22 | }
23 |
24 | protected function getKernel()
25 | {
26 | return ServiceKernel::instance();
27 | }
28 | }
--------------------------------------------------------------------------------
/tastphp-1.3.6/src/Service/Common/DaoException.php:
--------------------------------------------------------------------------------
1 | container = $container;
16 | }
17 |
18 | static function instance()
19 | {
20 | if (!self::$instance) {
21 | self::$instance = new self();
22 | }
23 |
24 | return self::$instance;
25 | }
26 |
27 | public function setConnection($connection)
28 | {
29 | $this->connection = $connection;
30 | }
31 |
32 | public function getConnection()
33 | {
34 | return $this->connection;
35 | }
36 |
37 | public function registerService($name)
38 | {
39 | if (empty($this->container[$name])) {
40 | $service = $this->register('Service', $name);
41 | $this->container[$name] = $service;
42 | }
43 | return $this->container[$name];
44 | }
45 |
46 | public function registerDao($name)
47 | {
48 | if (empty($this->container[$name])) {
49 | $dao = $this->register('Dao', $name);
50 | $dao->setContainer($this->container);
51 | $dao->setConnection($this->getConnection());
52 | $this->container[$name] = $dao;
53 | }
54 | return $this->container[$name];
55 | }
56 |
57 | public function getContainer()
58 | {
59 | return $this->container;
60 | }
61 |
62 | private function register($type, $name)
63 | {
64 | list($module, $classType) = explode('.', $name);
65 | $extraDir = $type == 'Dao' ? '\\Dao' : '';
66 | $className = __NAMESPACE__ . "\\" . $module . "$extraDir\\Impl\\" . $classType . "Impl";
67 | return new $className;
68 | }
69 | }
--------------------------------------------------------------------------------
/tastphp-1.3.6/tests/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/tastphp-1.3.6/tests/.gitkeep
--------------------------------------------------------------------------------
/tastphp-1.3.6/tests/AppTest.php:
--------------------------------------------------------------------------------
1 | match('/','GET');
10 | $this->assertEquals($result,'it works!');
11 | }
12 | }
--------------------------------------------------------------------------------
/tastphp-1.3.6/tests/bootstrap.php:
--------------------------------------------------------------------------------
1 | container = $container;
12 | }
13 |
14 | public function indexAction()
15 | {
16 | return 'it works!';
17 | }
18 | }
--------------------------------------------------------------------------------
/tastphp-1.3.6/tests/web/views/errors/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/tastphp-1.3.6/tests/web/views/errors/.gitkeep
--------------------------------------------------------------------------------
/tastphp-1.3.6/tests/web/views/frontBundle/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/tastphp-1.3.6/tests/web/views/frontBundle/.gitkeep
--------------------------------------------------------------------------------
/tastphp-1.3.6/web/bootstrap.php:
--------------------------------------------------------------------------------
1 | run();
8 |
--------------------------------------------------------------------------------
/tastphp-1.3.6/web/views/errors/404.html:
--------------------------------------------------------------------------------
1 | 404 page
--------------------------------------------------------------------------------
/tastphp-1.3.6/web/views/errors/500.html:
--------------------------------------------------------------------------------
1 | 500 page
--------------------------------------------------------------------------------
/yii2-2.0.12/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory" : "vendor/bower"
3 | }
4 |
--------------------------------------------------------------------------------
/yii2-2.0.12/.gitignore:
--------------------------------------------------------------------------------
1 | # phpstorm project files
2 | .idea
3 |
4 | # netbeans project files
5 | nbproject
6 |
7 | # zend studio for eclipse project files
8 | .buildpath
9 | .project
10 | .settings
11 |
12 | # windows thumbnail cache
13 | Thumbs.db
14 |
15 | # composer vendor dir
16 | /vendor
17 |
18 | # composer itself is not needed
19 | composer.phar
20 |
21 | # Mac DS_Store Files
22 | .DS_Store
23 |
24 | # phpunit itself is not needed
25 | phpunit.phar
26 | # local phpunit config
27 | /phpunit.xml
28 |
29 | tests/_output/*
30 | tests/_support/_generated
--------------------------------------------------------------------------------
/yii2-2.0.12/LICENSE.md:
--------------------------------------------------------------------------------
1 | The Yii framework is free software. It is released under the terms of
2 | the following BSD License.
3 |
4 | Copyright © 2008 by Yii Software LLC (http://www.yiisoft.com)
5 | All rights reserved.
6 |
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions
9 | are met:
10 |
11 | * Redistributions of source code must retain the above copyright
12 | notice, this list of conditions and the following disclaimer.
13 | * Redistributions in binary form must reproduce the above copyright
14 | notice, this list of conditions and the following disclaimer in
15 | the documentation and/or other materials provided with the
16 | distribution.
17 | * Neither the name of Yii Software LLC nor the names of its
18 | contributors may be used to endorse or promote products derived
19 | from this software without specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | POSSIBILITY OF SUCH DAMAGE.
33 |
--------------------------------------------------------------------------------
/yii2-2.0.12/assets/AppAsset.php:
--------------------------------------------------------------------------------
1 |
14 | * @since 2.0
15 | */
16 | class AppAsset extends AssetBundle
17 | {
18 | public $basePath = '@webroot';
19 | public $baseUrl = '@web';
20 | public $css = [
21 | 'css/site.css',
22 | ];
23 | public $js = [
24 | ];
25 | public $depends = [
26 | 'yii\web\YiiAsset',
27 | 'yii\bootstrap\BootstrapAsset',
28 | ];
29 | }
30 |
--------------------------------------------------------------------------------
/yii2-2.0.12/codeception.yml:
--------------------------------------------------------------------------------
1 | actor: Tester
2 | paths:
3 | tests: tests
4 | log: tests/_output
5 | data: tests/_data
6 | helpers: tests/_support
7 | settings:
8 | bootstrap: _bootstrap.php
9 | memory_limit: 1024M
10 | colors: true
11 | modules:
12 | config:
13 | Yii2:
14 | configFile: 'config/test.php'
15 | cleanup: false
16 |
17 | # To enable code coverage:
18 | #coverage:
19 | # #c3_url: http://localhost:8080/index-test.php/
20 | # enabled: true
21 | # #remote: true
22 | # #remote_config: '../codeception.yml'
23 | # whitelist:
24 | # include:
25 | # - models/*
26 | # - controllers/*
27 | # - commands/*
28 | # - mail/*
29 | # blacklist:
30 | # include:
31 | # - assets/*
32 | # - config/*
33 | # - runtime/*
34 | # - vendor/*
35 | # - views/*
36 | # - web/*
37 | # - tests/*
38 |
--------------------------------------------------------------------------------
/yii2-2.0.12/commands/HelloController.php:
--------------------------------------------------------------------------------
1 |
18 | * @since 2.0
19 | */
20 | class HelloController extends Controller
21 | {
22 | /**
23 | * This command echoes what you have entered as the message.
24 | * @param string $message the message to be echoed.
25 | */
26 | public function actionIndex($message = 'hello world')
27 | {
28 | echo $message . "\n";
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/yii2-2.0.12/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "yiisoft/yii2-app-basic",
3 | "description": "Yii 2 Basic Project Template",
4 | "keywords": ["yii2", "framework", "basic", "project template"],
5 | "homepage": "http://www.yiiframework.com/",
6 | "type": "project",
7 | "license": "BSD-3-Clause",
8 | "support": {
9 | "issues": "https://github.com/yiisoft/yii2/issues?state=open",
10 | "forum": "http://www.yiiframework.com/forum/",
11 | "wiki": "http://www.yiiframework.com/wiki/",
12 | "irc": "irc://irc.freenode.net/yii",
13 | "source": "https://github.com/yiisoft/yii2"
14 | },
15 | "minimum-stability": "stable",
16 | "require": {
17 | "php": ">=5.4.0",
18 | "yiisoft/yii2": "~2.0.5",
19 | "yiisoft/yii2-bootstrap": "~2.0.0",
20 | "yiisoft/yii2-swiftmailer": "~2.0.0"
21 | },
22 | "require-dev": {
23 | "yiisoft/yii2-debug": "~2.0.0",
24 | "yiisoft/yii2-gii": "~2.0.0",
25 | "yiisoft/yii2-faker": "~2.0.0",
26 |
27 | "codeception/base": "^2.2.3",
28 | "codeception/verify": "~0.3.1",
29 | "codeception/specify": "~0.4.3"
30 | },
31 | "config": {
32 | "process-timeout": 1800,
33 | "fxp-asset":{
34 | "installer-paths": {
35 | "npm-asset-library": "vendor/npm",
36 | "bower-asset-library": "vendor/bower"
37 | }
38 | }
39 | },
40 | "scripts": {
41 | "post-create-project-cmd": [
42 | "yii\\composer\\Installer::postCreateProject"
43 | ]
44 | },
45 | "extra": {
46 | "yii\\composer\\Installer::postCreateProject": {
47 | "setPermission": [
48 | {
49 | "runtime": "0777",
50 | "web/assets": "0777",
51 | "yii": "0755"
52 | }
53 | ],
54 | "generateCookieValidationKey": [
55 | "config/web.php"
56 | ]
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/yii2-2.0.12/config/console.php:
--------------------------------------------------------------------------------
1 | 'basic-console',
8 | 'basePath' => dirname(__DIR__),
9 | 'bootstrap' => ['log'],
10 | 'controllerNamespace' => 'app\commands',
11 | 'components' => [
12 | 'cache' => [
13 | 'class' => 'yii\caching\FileCache',
14 | ],
15 | 'log' => [
16 | 'targets' => [
17 | [
18 | 'class' => 'yii\log\FileTarget',
19 | 'levels' => ['error', 'warning'],
20 | ],
21 | ],
22 | ],
23 | 'db' => $db,
24 | ],
25 | 'params' => $params,
26 | /*
27 | 'controllerMap' => [
28 | 'fixture' => [ // Fixture generation command line.
29 | 'class' => 'yii\faker\FixtureController',
30 | ],
31 | ],
32 | */
33 | ];
34 |
35 | if (YII_ENV_DEV) {
36 | // configuration adjustments for 'dev' environment
37 | $config['bootstrap'][] = 'gii';
38 | $config['modules']['gii'] = [
39 | 'class' => 'yii\gii\Module',
40 | ];
41 | }
42 |
43 | return $config;
44 |
--------------------------------------------------------------------------------
/yii2-2.0.12/config/db.php:
--------------------------------------------------------------------------------
1 | 'yii\db\Connection',
5 | 'dsn' => 'mysql:host=localhost;dbname=yii2basic',
6 | 'username' => 'root',
7 | 'password' => '',
8 | 'charset' => 'utf8',
9 | ];
10 |
--------------------------------------------------------------------------------
/yii2-2.0.12/config/params.php:
--------------------------------------------------------------------------------
1 | 'admin@example.com',
5 | ];
6 |
--------------------------------------------------------------------------------
/yii2-2.0.12/config/test.php:
--------------------------------------------------------------------------------
1 | 'basic-tests',
10 | 'basePath' => dirname(__DIR__),
11 | 'language' => 'en-US',
12 | 'components' => [
13 | 'db' => $db,
14 | 'mailer' => [
15 | 'useFileTransport' => true,
16 | ],
17 | 'assetManager' => [
18 | 'basePath' => __DIR__ . '/../web/assets',
19 | ],
20 | 'urlManager' => [
21 | 'showScriptName' => true,
22 | ],
23 | 'user' => [
24 | 'identityClass' => 'app\models\User',
25 | ],
26 | 'request' => [
27 | 'cookieValidationKey' => 'test',
28 | 'enableCsrfValidation' => false,
29 | // but if you absolutely need it set cookie domain to localhost
30 | /*
31 | 'csrfCookie' => [
32 | 'domain' => 'localhost',
33 | ],
34 | */
35 | ],
36 | ],
37 | 'params' => $params,
38 | ];
39 |
--------------------------------------------------------------------------------
/yii2-2.0.12/config/test_db.php:
--------------------------------------------------------------------------------
1 | 'basic',
8 | 'basePath' => dirname(__DIR__),
9 | 'bootstrap' => ['log'],
10 | 'components' => [
11 | 'request' => [
12 | // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
13 | 'cookieValidationKey' => 'yii2SecretKey',
14 | ],
15 | 'cache' => [
16 | 'class' => 'yii\caching\FileCache',
17 | ],
18 | 'user' => [
19 | 'identityClass' => 'app\models\User',
20 | 'enableAutoLogin' => true,
21 | ],
22 | 'errorHandler' => [
23 | 'errorAction' => 'site/error',
24 | ],
25 | 'mailer' => [
26 | 'class' => 'yii\swiftmailer\Mailer',
27 | // send all mails to a file by default. You have to set
28 | // 'useFileTransport' to false and configure a transport
29 | // for the mailer to send real emails.
30 | 'useFileTransport' => true,
31 | ],
32 | 'log' => [
33 | 'traceLevel' => YII_DEBUG ? 3 : 0,
34 | 'targets' => [
35 | [
36 | 'class' => 'yii\log\FileTarget',
37 | 'levels' => ['error', 'warning'],
38 | ],
39 | ],
40 | ],
41 | 'db' => $db,
42 | /*
43 | 'urlManager' => [
44 | 'enablePrettyUrl' => true,
45 | 'showScriptName' => false,
46 | 'rules' => [
47 | ],
48 | ],
49 | */
50 | ],
51 | 'params' => $params,
52 | ];
53 |
54 | if (YII_ENV_DEV) {
55 | // configuration adjustments for 'dev' environment
56 | $config['bootstrap'][] = 'debug';
57 | $config['modules']['debug'] = [
58 | 'class' => 'yii\debug\Module',
59 | // uncomment the following to add your IP if you are not connecting from localhost.
60 | //'allowedIPs' => ['127.0.0.1', '::1'],
61 | ];
62 |
63 | $config['bootstrap'][] = 'gii';
64 | $config['modules']['gii'] = [
65 | 'class' => 'yii\gii\Module',
66 | // uncomment the following to add your IP if you are not connecting from localhost.
67 | //'allowedIPs' => ['127.0.0.1', '::1'],
68 | ];
69 | }
70 |
71 | return $config;
72 |
--------------------------------------------------------------------------------
/yii2-2.0.12/mail/layouts/html.php:
--------------------------------------------------------------------------------
1 |
8 | beginPage() ?>
9 |
10 |
11 |
12 |
13 | = Html::encode($this->title) ?>
14 | head() ?>
15 |
16 |
17 | beginBody() ?>
18 | = $content ?>
19 | endBody() ?>
20 |
21 |
22 | endPage() ?>
23 |
--------------------------------------------------------------------------------
/yii2-2.0.12/models/ContactForm.php:
--------------------------------------------------------------------------------
1 | 'Verification Code',
42 | ];
43 | }
44 |
45 | /**
46 | * Sends an email to the specified email address using the information collected by this model.
47 | * @param string $email the target email address
48 | * @return bool whether the model passes validation
49 | */
50 | public function contact($email)
51 | {
52 | if ($this->validate()) {
53 | Yii::$app->mailer->compose()
54 | ->setTo($email)
55 | ->setFrom([$this->email => $this->name])
56 | ->setSubject($this->subject)
57 | ->setTextBody($this->body)
58 | ->send();
59 |
60 | return true;
61 | }
62 | return false;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/yii2-2.0.12/models/LoginForm.php:
--------------------------------------------------------------------------------
1 | hasErrors()) {
48 | $user = $this->getUser();
49 |
50 | if (!$user || !$user->validatePassword($this->password)) {
51 | $this->addError($attribute, 'Incorrect username or password.');
52 | }
53 | }
54 | }
55 |
56 | /**
57 | * Logs in a user using the provided username and password.
58 | * @return bool whether the user is logged in successfully
59 | */
60 | public function login()
61 | {
62 | if ($this->validate()) {
63 | return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0);
64 | }
65 | return false;
66 | }
67 |
68 | /**
69 | * Finds user by [[username]]
70 | *
71 | * @return User|null
72 | */
73 | public function getUser()
74 | {
75 | if ($this->_user === false) {
76 | $this->_user = User::findByUsername($this->username);
77 | }
78 |
79 | return $this->_user;
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/yii2-2.0.12/runtime/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
--------------------------------------------------------------------------------
/yii2-2.0.12/tests/_bootstrap.php:
--------------------------------------------------------------------------------
1 | amOnPage(Url::toRoute('/site/about'));
9 | $I->see('About', 'h1');
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/yii2-2.0.12/tests/acceptance/ContactCest.php:
--------------------------------------------------------------------------------
1 | amOnPage(Url::toRoute('/site/contact'));
10 | }
11 |
12 | public function contactPageWorks(AcceptanceTester $I)
13 | {
14 | $I->wantTo('ensure that contact page works');
15 | $I->see('Contact', 'h1');
16 | }
17 |
18 | public function contactFormCanBeSubmitted(AcceptanceTester $I)
19 | {
20 | $I->amGoingTo('submit contact form with correct data');
21 | $I->fillField('#contactform-name', 'tester');
22 | $I->fillField('#contactform-email', 'tester@example.com');
23 | $I->fillField('#contactform-subject', 'test subject');
24 | $I->fillField('#contactform-body', 'test content');
25 | $I->fillField('#contactform-verifycode', 'testme');
26 |
27 | $I->click('contact-button');
28 |
29 | $I->wait(2); // wait for button to be clicked
30 |
31 | $I->dontSeeElement('#contact-form');
32 | $I->see('Thank you for contacting us. We will respond to you as soon as possible.');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/yii2-2.0.12/tests/acceptance/HomeCest.php:
--------------------------------------------------------------------------------
1 | amOnPage(Url::toRoute('/site/index'));
9 | $I->see('My Company');
10 |
11 | $I->seeLink('About');
12 | $I->click('About');
13 | $I->wait(2); // wait for page to be opened
14 |
15 | $I->see('This is the About page.');
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/yii2-2.0.12/tests/acceptance/LoginCest.php:
--------------------------------------------------------------------------------
1 | amOnPage(Url::toRoute('/site/login'));
9 | $I->see('Login', 'h1');
10 |
11 | $I->amGoingTo('try to login with correct credentials');
12 | $I->fillField('input[name="LoginForm[username]"]', 'admin');
13 | $I->fillField('input[name="LoginForm[password]"]', 'admin');
14 | $I->click('login-button');
15 | $I->wait(2); // wait for button to be clicked
16 |
17 | $I->expectTo('see user info');
18 | $I->see('Logout');
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/yii2-2.0.12/tests/acceptance/_bootstrap.php:
--------------------------------------------------------------------------------
1 | [
21 | 'db' => require(__DIR__ . '/../../config/test_db.php')
22 | ]
23 | ]
24 | );
25 |
26 |
27 | $application = new yii\console\Application($config);
28 | $exitCode = $application->run();
29 | exit($exitCode);
--------------------------------------------------------------------------------
/yii2-2.0.12/tests/bin/yii.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | rem -------------------------------------------------------------
4 | rem Yii command line bootstrap script for Windows.
5 | rem
6 | rem @author Qiang Xue
7 | rem @link http://www.yiiframework.com/
8 | rem @copyright Copyright (c) 2008 Yii Software LLC
9 | rem @license http://www.yiiframework.com/license/
10 | rem -------------------------------------------------------------
11 |
12 | @setlocal
13 |
14 | set YII_PATH=%~dp0
15 |
16 | if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe
17 |
18 | "%PHP_COMMAND%" "%YII_PATH%yii" %*
19 |
20 | @endlocal
21 |
--------------------------------------------------------------------------------
/yii2-2.0.12/tests/functional.suite.yml:
--------------------------------------------------------------------------------
1 | # Codeception Test Suite Configuration
2 |
3 | # suite for functional (integration) tests.
4 | # emulate web requests and make application process them.
5 | # (tip: better to use with frameworks).
6 |
7 | # RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.
8 | #basic/web/index.php
9 | class_name: FunctionalTester
10 | modules:
11 | enabled:
12 | - Filesystem
13 | - Yii2
14 |
--------------------------------------------------------------------------------
/yii2-2.0.12/tests/functional/ContactFormCest.php:
--------------------------------------------------------------------------------
1 | amOnPage(['site/contact']);
7 | }
8 |
9 | public function openContactPage(\FunctionalTester $I)
10 | {
11 | $I->see('Contact', 'h1');
12 | }
13 |
14 | public function submitEmptyForm(\FunctionalTester $I)
15 | {
16 | $I->submitForm('#contact-form', []);
17 | $I->expectTo('see validations errors');
18 | $I->see('Contact', 'h1');
19 | $I->see('Name cannot be blank');
20 | $I->see('Email cannot be blank');
21 | $I->see('Subject cannot be blank');
22 | $I->see('Body cannot be blank');
23 | $I->see('The verification code is incorrect');
24 | }
25 |
26 | public function submitFormWithIncorrectEmail(\FunctionalTester $I)
27 | {
28 | $I->submitForm('#contact-form', [
29 | 'ContactForm[name]' => 'tester',
30 | 'ContactForm[email]' => 'tester.email',
31 | 'ContactForm[subject]' => 'test subject',
32 | 'ContactForm[body]' => 'test content',
33 | 'ContactForm[verifyCode]' => 'testme',
34 | ]);
35 | $I->expectTo('see that email address is wrong');
36 | $I->dontSee('Name cannot be blank', '.help-inline');
37 | $I->see('Email is not a valid email address.');
38 | $I->dontSee('Subject cannot be blank', '.help-inline');
39 | $I->dontSee('Body cannot be blank', '.help-inline');
40 | $I->dontSee('The verification code is incorrect', '.help-inline');
41 | }
42 |
43 | public function submitFormSuccessfully(\FunctionalTester $I)
44 | {
45 | $I->submitForm('#contact-form', [
46 | 'ContactForm[name]' => 'tester',
47 | 'ContactForm[email]' => 'tester@example.com',
48 | 'ContactForm[subject]' => 'test subject',
49 | 'ContactForm[body]' => 'test content',
50 | 'ContactForm[verifyCode]' => 'testme',
51 | ]);
52 | $I->seeEmailIsSent();
53 | $I->dontSeeElement('#contact-form');
54 | $I->see('Thank you for contacting us. We will respond to you as soon as possible.');
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/yii2-2.0.12/tests/functional/LoginFormCest.php:
--------------------------------------------------------------------------------
1 | amOnRoute('site/login');
7 | }
8 |
9 | public function openLoginPage(\FunctionalTester $I)
10 | {
11 | $I->see('Login', 'h1');
12 |
13 | }
14 |
15 | // demonstrates `amLoggedInAs` method
16 | public function internalLoginById(\FunctionalTester $I)
17 | {
18 | $I->amLoggedInAs(100);
19 | $I->amOnPage('/');
20 | $I->see('Logout (admin)');
21 | }
22 |
23 | // demonstrates `amLoggedInAs` method
24 | public function internalLoginByInstance(\FunctionalTester $I)
25 | {
26 | $I->amLoggedInAs(\app\models\User::findByUsername('admin'));
27 | $I->amOnPage('/');
28 | $I->see('Logout (admin)');
29 | }
30 |
31 | public function loginWithEmptyCredentials(\FunctionalTester $I)
32 | {
33 | $I->submitForm('#login-form', []);
34 | $I->expectTo('see validations errors');
35 | $I->see('Username cannot be blank.');
36 | $I->see('Password cannot be blank.');
37 | }
38 |
39 | public function loginWithWrongCredentials(\FunctionalTester $I)
40 | {
41 | $I->submitForm('#login-form', [
42 | 'LoginForm[username]' => 'admin',
43 | 'LoginForm[password]' => 'wrong',
44 | ]);
45 | $I->expectTo('see validations errors');
46 | $I->see('Incorrect username or password.');
47 | }
48 |
49 | public function loginSuccessfully(\FunctionalTester $I)
50 | {
51 | $I->submitForm('#login-form', [
52 | 'LoginForm[username]' => 'admin',
53 | 'LoginForm[password]' => 'admin',
54 | ]);
55 | $I->see('Logout (admin)');
56 | $I->dontSeeElement('form#login-form');
57 | }
58 | }
--------------------------------------------------------------------------------
/yii2-2.0.12/tests/functional/_bootstrap.php:
--------------------------------------------------------------------------------
1 | model = $this->getMockBuilder('app\models\ContactForm')
19 | ->setMethods(['validate'])
20 | ->getMock();
21 |
22 | $this->model->expects($this->once())
23 | ->method('validate')
24 | ->will($this->returnValue(true));
25 |
26 | $this->model->attributes = [
27 | 'name' => 'Tester',
28 | 'email' => 'tester@example.com',
29 | 'subject' => 'very important letter subject',
30 | 'body' => 'body of current message',
31 | ];
32 |
33 | expect_that($this->model->contact('admin@example.com'));
34 |
35 | // using Yii2 module actions to check email was sent
36 | $this->tester->seeEmailIsSent();
37 |
38 | $emailMessage = $this->tester->grabLastSentEmail();
39 | expect('valid email is sent', $emailMessage)->isInstanceOf('yii\mail\MessageInterface');
40 | expect($emailMessage->getTo())->hasKey('admin@example.com');
41 | expect($emailMessage->getFrom())->hasKey('tester@example.com');
42 | expect($emailMessage->getSubject())->equals('very important letter subject');
43 | expect($emailMessage->toString())->contains('body of current message');
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/yii2-2.0.12/tests/unit/models/LoginFormTest.php:
--------------------------------------------------------------------------------
1 | user->logout();
15 | }
16 |
17 | public function testLoginNoUser()
18 | {
19 | $this->model = new LoginForm([
20 | 'username' => 'not_existing_username',
21 | 'password' => 'not_existing_password',
22 | ]);
23 |
24 | expect_not($this->model->login());
25 | expect_that(\Yii::$app->user->isGuest);
26 | }
27 |
28 | public function testLoginWrongPassword()
29 | {
30 | $this->model = new LoginForm([
31 | 'username' => 'demo',
32 | 'password' => 'wrong_password',
33 | ]);
34 |
35 | expect_not($this->model->login());
36 | expect_that(\Yii::$app->user->isGuest);
37 | expect($this->model->errors)->hasKey('password');
38 | }
39 |
40 | public function testLoginCorrect()
41 | {
42 | $this->model = new LoginForm([
43 | 'username' => 'demo',
44 | 'password' => 'demo',
45 | ]);
46 |
47 | expect_that($this->model->login());
48 | expect_not(\Yii::$app->user->isGuest);
49 | expect($this->model->errors)->hasntKey('password');
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/yii2-2.0.12/tests/unit/models/UserTest.php:
--------------------------------------------------------------------------------
1 | username)->equals('admin');
11 |
12 | expect_not(User::findIdentity(999));
13 | }
14 |
15 | public function testFindUserByAccessToken()
16 | {
17 | expect_that($user = User::findIdentityByAccessToken('100-token'));
18 | expect($user->username)->equals('admin');
19 |
20 | expect_not(User::findIdentityByAccessToken('non-existing'));
21 | }
22 |
23 | public function testFindUserByUsername()
24 | {
25 | expect_that($user = User::findByUsername('admin'));
26 | expect_not(User::findByUsername('not-admin'));
27 | }
28 |
29 | /**
30 | * @depends testFindUserByUsername
31 | */
32 | public function testValidateUser($user)
33 | {
34 | $user = User::findByUsername('admin');
35 | expect_that($user->validateAuthKey('test100key'));
36 | expect_not($user->validateAuthKey('test102key'));
37 |
38 | expect_that($user->validatePassword('admin'));
39 | expect_not($user->validatePassword('123456'));
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/yii2-2.0.12/views/layouts/main.php:
--------------------------------------------------------------------------------
1 |
14 | beginPage() ?>
15 |
16 |
17 |
18 |
19 |
20 |
21 | = Html::csrfMetaTags() ?>
22 | = Html::encode($this->title) ?>
23 | head() ?>
24 |
25 |
26 | beginBody() ?>
27 |
28 |
29 | 'My Company',
32 | 'brandUrl' => Yii::$app->homeUrl,
33 | 'options' => [
34 | 'class' => 'navbar-inverse navbar-fixed-top',
35 | ],
36 | ]);
37 | echo Nav::widget([
38 | 'options' => ['class' => 'navbar-nav navbar-right'],
39 | 'items' => [
40 | ['label' => 'Home', 'url' => ['/site/index']],
41 | ['label' => 'About', 'url' => ['/site/about']],
42 | ['label' => 'Contact', 'url' => ['/site/contact']],
43 | Yii::$app->user->isGuest ? (
44 | ['label' => 'Login', 'url' => ['/site/login']]
45 | ) : (
46 | '
'
47 | . Html::beginForm(['/site/logout'], 'post')
48 | . Html::submitButton(
49 | 'Logout (' . Yii::$app->user->identity->username . ')',
50 | ['class' => 'btn btn-link logout']
51 | )
52 | . Html::endForm()
53 | . ' '
54 | )
55 | ],
56 | ]);
57 | NavBar::end();
58 | ?>
59 |
60 |
61 | = Breadcrumbs::widget([
62 | 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
63 | ]) ?>
64 | = $content ?>
65 |
66 |
67 |
68 |
75 |
76 | endBody() ?>
77 |
78 |
79 | endPage() ?>
80 |
--------------------------------------------------------------------------------
/yii2-2.0.12/views/site/about.php:
--------------------------------------------------------------------------------
1 | title = 'About';
8 | $this->params['breadcrumbs'][] = $this->title;
9 | ?>
10 |
11 |
= Html::encode($this->title) ?>
12 |
13 |
14 | This is the About page. You may modify the following file to customize its content:
15 |
16 |
17 |
= __FILE__ ?>
18 |
19 |
--------------------------------------------------------------------------------
/yii2-2.0.12/views/site/error.php:
--------------------------------------------------------------------------------
1 | title = $name;
11 | ?>
12 |
13 |
14 |
= Html::encode($this->title) ?>
15 |
16 |
17 | = nl2br(Html::encode($message)) ?>
18 |
19 |
20 |
21 | The above error occurred while the Web server was processing your request.
22 |
23 |
24 | Please contact us if you think this is a server error. Thank you.
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/yii2-2.0.12/views/site/index.php:
--------------------------------------------------------------------------------
1 | title = 'My Yii Application';
6 | ?>
7 |
8 |
9 |
10 |
Congratulations!
11 |
12 |
You have successfully created your Yii-powered application.
13 |
14 |
Get started with Yii
15 |
16 |
17 |
18 |
19 |
20 |
21 |
Heading
22 |
23 |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
24 | dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
25 | ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
26 | fugiat nulla pariatur.
27 |
28 |
Yii Documentation »
29 |
30 |
31 |
Heading
32 |
33 |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
34 | dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
35 | ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
36 | fugiat nulla pariatur.
37 |
38 |
Yii Forum »
39 |
40 |
41 |
Heading
42 |
43 |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
44 | dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
45 | ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
46 | fugiat nulla pariatur.
47 |
48 |
Yii Extensions »
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/yii2-2.0.12/views/site/login.php:
--------------------------------------------------------------------------------
1 | title = 'Login';
11 | $this->params['breadcrumbs'][] = $this->title;
12 | ?>
13 |
14 |
= Html::encode($this->title) ?>
15 |
16 |
Please fill out the following fields to login:
17 |
18 | 'login-form',
20 | 'layout' => 'horizontal',
21 | 'fieldConfig' => [
22 | 'template' => "{label}\n
{input}
\n
{error}
",
23 | 'labelOptions' => ['class' => 'col-lg-1 control-label'],
24 | ],
25 | ]); ?>
26 |
27 | = $form->field($model, 'username')->textInput(['autofocus' => true]) ?>
28 |
29 | = $form->field($model, 'password')->passwordInput() ?>
30 |
31 | = $form->field($model, 'rememberMe')->checkbox([
32 | 'template' => "
{input} {label}
\n
{error}
",
33 | ]) ?>
34 |
35 |
40 |
41 |
42 |
43 |
44 | You may login with admin/admin or demo/demo .
45 | To modify the username/password, please check out the code app\models\User::$users
.
46 |
47 |
48 |
--------------------------------------------------------------------------------
/yii2-2.0.12/web/assets/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/yii2-2.0.12/web/css/site.css:
--------------------------------------------------------------------------------
1 | html,
2 | body {
3 | height: 100%;
4 | }
5 |
6 | .wrap {
7 | min-height: 100%;
8 | height: auto;
9 | margin: 0 auto -60px;
10 | padding: 0 0 60px;
11 | }
12 |
13 | .wrap > .container {
14 | padding: 70px 15px 20px;
15 | }
16 |
17 | .footer {
18 | height: 60px;
19 | background-color: #f5f5f5;
20 | border-top: 1px solid #ddd;
21 | padding-top: 20px;
22 | }
23 |
24 | .jumbotron {
25 | text-align: center;
26 | background-color: transparent;
27 | }
28 |
29 | .jumbotron .btn {
30 | font-size: 21px;
31 | padding: 14px 24px;
32 | }
33 |
34 | .not-set {
35 | color: #c55;
36 | font-style: italic;
37 | }
38 |
39 | /* add sorting icons to gridview sort links */
40 | a.asc:after, a.desc:after {
41 | position: relative;
42 | top: 1px;
43 | display: inline-block;
44 | font-family: 'Glyphicons Halflings';
45 | font-style: normal;
46 | font-weight: normal;
47 | line-height: 1;
48 | padding-left: 5px;
49 | }
50 |
51 | a.asc:after {
52 | content: /*"\e113"*/ "\e151";
53 | }
54 |
55 | a.desc:after {
56 | content: /*"\e114"*/ "\e152";
57 | }
58 |
59 | .sort-numerical a.asc:after {
60 | content: "\e153";
61 | }
62 |
63 | .sort-numerical a.desc:after {
64 | content: "\e154";
65 | }
66 |
67 | .sort-ordinal a.asc:after {
68 | content: "\e155";
69 | }
70 |
71 | .sort-ordinal a.desc:after {
72 | content: "\e156";
73 | }
74 |
75 | .grid-view th {
76 | white-space: nowrap;
77 | }
78 |
79 | .hint-block {
80 | display: block;
81 | margin-top: 5px;
82 | color: #999;
83 | }
84 |
85 | .error-summary {
86 | color: #a94442;
87 | background: #fdf7f7;
88 | border-left: 3px solid #eed3d7;
89 | padding: 10px 20px;
90 | margin: 0 0 15px 0;
91 | }
92 |
93 | /* align the logout "link" (button in form) of the navbar */
94 | .nav li > form > button.logout {
95 | padding: 15px;
96 | border: none;
97 | }
98 |
99 | @media(max-width:767px) {
100 | .nav li > form > button.logout {
101 | display:block;
102 | text-align: left;
103 | width: 100%;
104 | padding: 10px 15px;
105 | }
106 | }
107 |
108 | .nav > li > form > button.logout:focus,
109 | .nav > li > form > button.logout:hover {
110 | text-decoration: none;
111 | }
112 |
113 | .nav > li > form > button.logout:focus {
114 | outline: none;
115 | }
116 |
--------------------------------------------------------------------------------
/yii2-2.0.12/web/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xujiajun/php-framework-benchmark/70606a00ddd72c49029b027f8585f0a08bf58e44/yii2-2.0.12/web/favicon.ico
--------------------------------------------------------------------------------
/yii2-2.0.12/web/index-test.php:
--------------------------------------------------------------------------------
1 | run();
17 |
--------------------------------------------------------------------------------
/yii2-2.0.12/web/index.php:
--------------------------------------------------------------------------------
1 | run();
13 |
--------------------------------------------------------------------------------
/yii2-2.0.12/web/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
--------------------------------------------------------------------------------
/yii2-2.0.12/yii:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | run();
21 | exit($exitCode);
22 |
--------------------------------------------------------------------------------
/yii2-2.0.12/yii.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | rem -------------------------------------------------------------
4 | rem Yii command line bootstrap script for Windows.
5 | rem
6 | rem @author Qiang Xue
7 | rem @link http://www.yiiframework.com/
8 | rem @copyright Copyright (c) 2008 Yii Software LLC
9 | rem @license http://www.yiiframework.com/license/
10 | rem -------------------------------------------------------------
11 |
12 | @setlocal
13 |
14 | set YII_PATH=%~dp0
15 |
16 | if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe
17 |
18 | "%PHP_COMMAND%" "%YII_PATH%yii" %*
19 |
20 | @endlocal
21 |
--------------------------------------------------------------------------------