Skip to content

Commit

Permalink
Ubiquity & list.sh
Browse files Browse the repository at this point in the history
- Added ubiquity-2.4.x.dev
- Update list.sh
  • Loading branch information
myaaghubi committed May 14, 2022
1 parent c4f17c6 commit 69303ae
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 0 deletions.
1 change: 1 addition & 0 deletions list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ slim-3.12
slim-4.10
symfony-5.4
symfony-6.0
ubiquity-2.4.x.dev
yii-2.0-basic
"
3 changes: 3 additions & 0 deletions ubiquity-2.4.x.dev/_benchmark/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
rm -rf !("_benchmark")
rm -rf _benchmark/temp
3 changes: 3 additions & 0 deletions ubiquity-2.4.x.dev/_benchmark/clear-cache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
# clear cache
echo -e "!"
2 changes: 2 additions & 0 deletions ubiquity-2.4.x.dev/_benchmark/hello_world.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
url="$base/$fw/public/index.php?c=HelloWorldController/index"
12 changes: 12 additions & 0 deletions ubiquity-2.4.x.dev/_benchmark/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
# create project
rm -rf _benchmark/temp
composer create-project phpmv/ubiquity-project:2.4.x-dev ./_benchmark/temp
mv ./_benchmark/temp/{.,}* ./

# have the route & controller
yes|cp -rf _benchmark/ubiquity/. ./

# some enhancements
composer install --no-dev --optimize-autoloader
rm ./public/.htaccess
27 changes: 27 additions & 0 deletions ubiquity-2.4.x.dev/_benchmark/ubiquity/app/config/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
return array(
"siteUrl"=>"http://127.0.0.1/temp/public/",
"database"=>[
"type"=>"mysql",
"dbName"=>"",
"serverName"=>"127.0.0.1",
"port"=>"3306",
"user"=>"root",
"password"=>"",
"options"=>[],
"cache"=>false
],
"sessionName"=>"temp",
"namespaces"=>[],
"templateEngine"=>'Ubiquity\\views\\engine\\Twig',
"templateEngineOptions"=>array("cache"=>false),
"test"=>false,
"debug"=>false,
"logger"=>function(){return new \Ubiquity\log\libraries\UMonolog("temp",\Monolog\Logger::INFO);},
"di"=>["@exec"=>["jquery"=>function($controller){
/* *** php-frameworks-bench *** */
// return \Ajax\php\ubiquity\JsUtils::diSemantic($controller);
}]],
"cache"=>["directory"=>"cache/","system"=>"Ubiquity\\cache\\system\\ArrayCache","params"=>[]],
"mvcNS"=>["models"=>"models","controllers"=>"controllers","rest"=>""]
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/*
php-frameworks-bench
this is a simple hello world controller to make benchmark
*/
namespace controllers;

class HelloWorldController extends \Ubiquity\controllers\Controller {
public function index() {
echo "Hello World!";
}
}
13 changes: 13 additions & 0 deletions ubiquity-2.4.x.dev/_benchmark/ubiquity/public/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', __DIR__ . DS . '..' . DS . 'app' . DS);
$config = include ROOT . 'config/config.php';
require ROOT . './../vendor/autoload.php';
require ROOT . 'config/services.php';
\Ubiquity\controllers\Startup::run($config);

/* *** php-frameworks-bench *** */
require $_SERVER['DOCUMENT_ROOT'].'/php-frameworks-bench/libs/output_data.php';
9 changes: 9 additions & 0 deletions ubiquity-2.4.x.dev/_benchmark/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
composer update

# have the route & controller
yes|cp -rf _benchmark/ubiquity/. ./

# some enhancements
composer install --no-dev --optimize-autoloader
rm ./public/.htaccess

0 comments on commit 69303ae

Please sign in to comment.