Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kminek committed Jun 15, 2019
0 parents commit 33ff9d4
Show file tree
Hide file tree
Showing 97 changed files with 5,185 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/vendor
composer.lock
5 changes: 5 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
RewriteEngine On
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# MomentPHP | The PHP mini-framework based on Slim and Laravel Components

The framework app skeleton can be found here: [momentphp/app](https://github.com/momentphp/app).
40 changes: 40 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "momentphp/framework",
"description": "MomentPHP | The PHP mini-framework based on Slim and Laravel Components",
"homepage": "http://momentphp.kminek.pl",
"keywords": ["framework", "momentphp"],
"require": {
"slim/slim": "3.3.*",
"illuminate/support": "5.1.*",
"illuminate/events": "5.1.*",
"illuminate/database": "5.1.*",
"illuminate/cache": "5.1.*",
"illuminate/filesystem": "5.1.*",
"smarty/smarty": "3.1.*",
"twig/twig": "1.24.*",
"monolog/monolog": "1.18.*",
"filp/whoops": "2.1.*",
"symfony/var-dumper": "3.0.*",
"willdurand/negotiation": "2.0.*",
"soundasleep/html2text": "0.2.*"
},
"require-dev": {
"phpunit/phpunit": "4.*"
},
"autoload": {
"psr-4": {
"momentphp\\": "src"
},
"files": [
"src/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"momentphp\\tests\\": "tests"
}
},
"minimum-stability": "dev",
"prefer-stable" : true
}

34 changes: 34 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

/**
* Discover & require Composer autoloader (upwards in folders tree)
*/
$pathBase = __DIR__;
do {
$autoload = implode(DIRECTORY_SEPARATOR, [$pathBase, 'vendor', 'autoload.php']);
if (file_exists($autoload)) {
require $autoload;
break;
}
$pathBase = dirname($pathBase);
} while (dirname($pathBase) !== $pathBase);

/**
* Bundles to load
*/
$bundles = [
momentphp\test\bundles\first\Bundle::class => ['alias' => 'first'],
momentphp\test\bundles\second\Bundle::class => ['alias' => 'second'],
momentphp\test\bundles\third\Bundle::class => ['alias' => 'third'],
momentphp\test\app\Bundle::class => ['alias' => 'app'],
];

/**
* Construct app
*/
$app = new momentphp\App($bundles);

/**
* Send response to the client
*/
$app->run();
19 changes: 19 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="MomentPHP Test Suite">
<directory>./tests/cases/</directory>
</testsuite>
</testsuites>
</phpunit>
Loading

0 comments on commit 33ff9d4

Please sign in to comment.