Browse Source

Merge with FrameworkBenchmarks Master

Matthieu Garrigues 9 years ago
parent
commit
6004509724
100 changed files with 76 additions and 3341 deletions
  1. 1 2
      .travis.yml
  2. 0 2
      config/create-postgres-database.sql
  3. 0 29
      config/create-postgres-old.sql
  4. 0 29
      config/create-postgres-upper-quote.sql
  5. 4 0
      config/create-postgres.sql
  6. 2 53
      config/create.sql
  7. 1 1
      config/travis_setup.sh
  8. 3 3
      frameworks/CSharp/aspnetcore/benchmark_config.json
  9. 1 1
      frameworks/CSharp/aspnetcore/run-linux.sh
  10. 1 1
      frameworks/CSharp/aspnetcore/run-windows.ps1
  11. 1 1
      frameworks/Elixir/phoenix/lib/hello/repo.ex
  12. 6 7
      frameworks/Elixir/phoenix/mix.exs
  13. 3 2
      frameworks/Elixir/phoenix/setup.sh
  14. 30 10
      frameworks/Elixir/phoenix/web/controllers/page_controller.ex
  15. 3 3
      frameworks/Elixir/phoenix/web/models/fortune.ex
  16. 3 3
      frameworks/Elixir/phoenix/web/models/world.ex
  17. 1 1
      frameworks/Elixir/phoenix/web/templates/layout/app.html.eex
  18. 10 6
      frameworks/Elixir/phoenix/web/web.ex
  19. 0 8
      frameworks/Erlang/misultin/.gitignore
  20. 0 13
      frameworks/Erlang/misultin/Makefile
  21. 0 23
      frameworks/Erlang/misultin/benchmark_config.json
  22. 0 9
      frameworks/Erlang/misultin/priv/app.config
  23. 0 5
      frameworks/Erlang/misultin/rebar.config
  24. 0 11
      frameworks/Erlang/misultin/setup.sh
  25. 0 9
      frameworks/Erlang/misultin/src/misultin_bench.app.src
  26. 0 16
      frameworks/Erlang/misultin/src/misultin_bench_app.erl
  27. 0 18
      frameworks/Erlang/misultin/src/misultin_bench_sup.erl
  28. 0 53
      frameworks/Erlang/misultin/src/web_handler.erl
  29. 0 7
      frameworks/Erlang/misultin/start-dev.sh
  30. 6 6
      frameworks/JavaScript/nodejs/README.md
  31. 0 21
      frameworks/JavaScript/ringojs/benchmark_config.json
  32. 0 10
      frameworks/PHP/micromvc/.gitignore
  33. 0 92
      frameworks/PHP/micromvc/Bootstrap.php
  34. 0 41
      frameworks/PHP/micromvc/CLI
  35. 0 28
      frameworks/PHP/micromvc/Class/Controller/Benchmark/Db.php
  36. 0 14
      frameworks/PHP/micromvc/Class/Controller/Benchmark/Json.php
  37. 0 21
      frameworks/PHP/micromvc/Class/Controller/Index.php
  38. 0 19
      frameworks/PHP/micromvc/Class/Controller/Page404.php
  39. 0 153
      frameworks/PHP/micromvc/Class/Controller/School.php
  40. 0 8
      frameworks/PHP/micromvc/Class/Model/Benchmark/World.php
  41. 0 22
      frameworks/PHP/micromvc/Class/Model/Car.php
  42. 0 28
      frameworks/PHP/micromvc/Class/Model/Club.php
  43. 0 22
      frameworks/PHP/micromvc/Class/Model/Dorm.php
  44. 0 22
      frameworks/PHP/micromvc/Class/Model/Membership.php
  45. 0 34
      frameworks/PHP/micromvc/Class/Model/Student.php
  46. 0 80
      frameworks/PHP/micromvc/Class/MyController.php
  47. 0 25
      frameworks/PHP/micromvc/Command/Backup.php
  48. 0 25
      frameworks/PHP/micromvc/Command/Create.php
  49. 0 25
      frameworks/PHP/micromvc/Command/Restore.php
  50. 0 27
      frameworks/PHP/micromvc/Command/Run.php
  51. 0 521
      frameworks/PHP/micromvc/Common.php
  52. 0 73
      frameworks/PHP/micromvc/Config/Config.php
  53. 0 36
      frameworks/PHP/micromvc/Config/Route.php
  54. 0 29
      frameworks/PHP/micromvc/Config/Sample.Migration.php
  55. 0 0
      frameworks/PHP/micromvc/Locale/.gitignore
  56. 0 51
      frameworks/PHP/micromvc/Public/.htaccess
  57. 0 212
      frameworks/PHP/micromvc/Public/Admin/CSS/admin.css
  58. 0 90
      frameworks/PHP/micromvc/Public/Admin/CSS/base.css
  59. 0 37
      frameworks/PHP/micromvc/Public/Admin/CSS/style.css
  60. BIN
      frameworks/PHP/micromvc/Public/Admin/Images/bullet_arrow_down.png
  61. BIN
      frameworks/PHP/micromvc/Public/Admin/Images/bullet_arrow_up.png
  62. BIN
      frameworks/PHP/micromvc/Public/Admin/Images/error.png
  63. 0 1
      frameworks/PHP/micromvc/Public/Admin/Images/famfamfam.com
  64. BIN
      frameworks/PHP/micromvc/Public/Admin/Images/message.png
  65. BIN
      frameworks/PHP/micromvc/Public/Admin/Images/success.png
  66. BIN
      frameworks/PHP/micromvc/Public/Admin/Images/warning.png
  67. 0 89
      frameworks/PHP/micromvc/Public/CSS/base.css
  68. 0 86
      frameworks/PHP/micromvc/Public/CSS/style.css
  69. BIN
      frameworks/PHP/micromvc/Public/Images/error.png
  70. 0 1
      frameworks/PHP/micromvc/Public/Images/famfamfam.com.txt
  71. BIN
      frameworks/PHP/micromvc/Public/Images/message.png
  72. BIN
      frameworks/PHP/micromvc/Public/Images/success.png
  73. BIN
      frameworks/PHP/micromvc/Public/Images/warning.png
  74. 0 38
      frameworks/PHP/micromvc/Public/index.php
  75. 0 17
      frameworks/PHP/micromvc/Public/web.config
  76. 0 36
      frameworks/PHP/micromvc/README.md
  77. 0 13
      frameworks/PHP/micromvc/README/install.txt
  78. 0 19
      frameworks/PHP/micromvc/README/license.txt
  79. 0 51
      frameworks/PHP/micromvc/README/sample.htaccess
  80. 0 39
      frameworks/PHP/micromvc/README/sample.nginx.conf
  81. 0 0
      frameworks/PHP/micromvc/Storage/Log/empty
  82. 0 2
      frameworks/PHP/micromvc/View/404.php
  83. 0 2
      frameworks/PHP/micromvc/View/Index/Index.php
  84. 0 51
      frameworks/PHP/micromvc/View/Layout.php
  85. 0 4
      frameworks/PHP/micromvc/View/School/Index.php
  86. 0 6
      frameworks/PHP/micromvc/View/Sidebar.php
  87. 0 71
      frameworks/PHP/micromvc/View/System/Debug.php
  88. 0 69
      frameworks/PHP/micromvc/View/System/Error.php
  89. 0 73
      frameworks/PHP/micromvc/View/System/Exception.php
  90. 0 25
      frameworks/PHP/micromvc/benchmark_config.json
  91. 0 29
      frameworks/PHP/micromvc/composer.json
  92. 0 131
      frameworks/PHP/micromvc/deploy/nginx.conf
  93. 0 9
      frameworks/PHP/micromvc/deploy/php-micromvc
  94. 0 10
      frameworks/PHP/micromvc/setup.sh
  95. 0 61
      frameworks/PHP/micromvc/source_code
  96. 0 7
      frameworks/PHP/micromvc/vendor/autoload.php
  97. 0 240
      frameworks/PHP/micromvc/vendor/composer/ClassLoader.php
  98. 0 9
      frameworks/PHP/micromvc/vendor/composer/autoload_classmap.php
  99. 0 11
      frameworks/PHP/micromvc/vendor/composer/autoload_namespaces.php
  100. 0 43
      frameworks/PHP/micromvc/vendor/composer/autoload_real.php

+ 1 - 2
.travis.yml

@@ -55,7 +55,6 @@ env:
     - "TESTDIR=Erlang/cowboy"
     - "TESTDIR=Erlang/elli"
     - "TESTDIR=Erlang/mochiweb"
-    - "TESTDIR=Erlang/misultin"
     - "TESTDIR=Go/beego"
     - "TESTDIR=Go/echo"
     - "TESTDIR=Go/falcore"
@@ -140,7 +139,6 @@ env:
     - "TESTDIR=PHP/limonade"
     - "TESTDIR=PHP/lithium"
     - "TESTDIR=PHP/lumen"
-    - "TESTDIR=PHP/micromvc"
     - "TESTDIR=PHP/phalcon"
     - "TESTDIR=PHP/phalcon-micro"
     - "TESTDIR=PHP/phpixie"
@@ -212,6 +210,7 @@ before_install:
 services:
   - postgresql
   - redis-server
+  - mongodb
 
 addons:
   postgresql: "9.3"

+ 0 - 2
config/create-postgres-database.sql

@@ -2,5 +2,3 @@ CREATE USER benchmarkdbuser WITH PASSWORD 'benchmarkdbpass';
 
 DROP DATABASE IF EXISTS hello_world;
 CREATE DATABASE hello_world WITH ENCODING 'UTF8';
-
-GRANT ALL PRIVILEGES ON DATABASE hello_world to benchmarkdbuser;

+ 0 - 29
config/create-postgres-old.sql

@@ -1,29 +0,0 @@
-DROP TABLE IF EXISTS World;
-CREATE TABLE  "World" (
-  id integer NOT NULL,
-  randomNumber integer NOT NULL default 0,
-  PRIMARY KEY  (id)
-);
-
-INSERT INTO "World" (id, randomNumber)
-SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id);
-
-DROP TABLE IF EXISTS Fortune;
-CREATE TABLE  "Fortune" (
-  id integer NOT NULL,
-  message varchar(2048) NOT NULL,
-  PRIMARY KEY  (id)
-);
-
-INSERT INTO fortune (id, message) VALUES (1, 'fortune: No such file or directory');
-INSERT INTO fortune (id, message) VALUES (2, 'A computer scientist is someone who fixes things that aren''t broken.');
-INSERT INTO fortune (id, message) VALUES (3, 'After enough decimal places, nobody gives a damn.');
-INSERT INTO fortune (id, message) VALUES (4, 'A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
-INSERT INTO fortune (id, message) VALUES (5, 'A computer program does what you tell it to do, not what you want it to do.');
-INSERT INTO fortune (id, message) VALUES (6, 'Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
-INSERT INTO fortune (id, message) VALUES (7, 'Any program that runs right is obsolete.');
-INSERT INTO fortune (id, message) VALUES (8, 'A list is only as strong as its weakest link. — Donald Knuth');
-INSERT INTO fortune (id, message) VALUES (9, 'Feature: A bug with seniority.');
-INSERT INTO fortune (id, message) VALUES (10, 'Computers make very fast, very accurate mistakes.');
-INSERT INTO fortune (id, message) VALUES (11, '<script>alert("This should not be displayed in a browser alert box.");</script>');
-INSERT INTO fortune (id, message) VALUES (12, 'フレームワークのベンチマーク');

+ 0 - 29
config/create-postgres-upper-quote.sql

@@ -1,29 +0,0 @@
-DROP TABLE IF EXISTS "World";
-CREATE TABLE  "World" (
-  id integer NOT NULL,
-  randomNumber integer NOT NULL default 0,
-  PRIMARY KEY  (id)
-);
-
-INSERT INTO "World" (id, randomNumber)
-SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id);
-
-DROP TABLE IF EXISTS "Fortune";
-CREATE TABLE "Fortune" (
-  id integer NOT NULL,
-  message varchar(2048) NOT NULL,
-  PRIMARY KEY  (id)
-);
-
-INSERT INTO "Fortune" (id, message) VALUES (1, 'fortune: No such file or directory');
-INSERT INTO "Fortune" (id, message) VALUES (2, 'A computer scientist is someone who fixes things that aren''t broken.');
-INSERT INTO "Fortune" (id, message) VALUES (3, 'After enough decimal places, nobody gives a damn.');
-INSERT INTO "Fortune" (id, message) VALUES (4, 'A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
-INSERT INTO "Fortune" (id, message) VALUES (5, 'A computer program does what you tell it to do, not what you want it to do.');
-INSERT INTO "Fortune" (id, message) VALUES (6, 'Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
-INSERT INTO "Fortune" (id, message) VALUES (7, 'Any program that runs right is obsolete.');
-INSERT INTO "Fortune" (id, message) VALUES (8, 'A list is only as strong as its weakest link. — Donald Knuth');
-INSERT INTO "Fortune" (id, message) VALUES (9, 'Feature: A bug with seniority.');
-INSERT INTO "Fortune" (id, message) VALUES (10, 'Computers make very fast, very accurate mistakes.');
-INSERT INTO "Fortune" (id, message) VALUES (11, '<script>alert("This should not be displayed in a browser alert box.");</script>');
-INSERT INTO "Fortune" (id, message) VALUES (12, 'フレームワークのベンチマーク');

+ 4 - 0
config/create-postgres.sql

@@ -5,6 +5,7 @@ CREATE TABLE  World (
   randomNumber integer NOT NULL default 0,
   PRIMARY KEY  (id)
 );
+GRANT SELECT, UPDATE ON World to benchmarkdbuser;
 
 INSERT INTO World (id, randomnumber)
 SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id);
@@ -15,6 +16,7 @@ CREATE TABLE Fortune (
   message varchar(2048) NOT NULL,
   PRIMARY KEY  (id)
 );
+GRANT SELECT ON Fortune to benchmarkdbuser;
 
 INSERT INTO Fortune (id, message) VALUES (1, 'fortune: No such file or directory');
 INSERT INTO Fortune (id, message) VALUES (2, 'A computer scientist is someone who fixes things that aren''t broken.');
@@ -36,6 +38,7 @@ CREATE TABLE  "World" (
   randomNumber integer NOT NULL default 0,
   PRIMARY KEY  (id)
 );
+GRANT SELECT, UPDATE ON "World" to benchmarkdbuser;
 
 INSERT INTO "World" (id, randomnumber)
 SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id);
@@ -46,6 +49,7 @@ CREATE TABLE "Fortune" (
   message varchar(2048) NOT NULL,
   PRIMARY KEY  (id)
 );
+GRANT SELECT ON "Fortune" to benchmarkdbuser;
 
 INSERT INTO "Fortune" (id, message) VALUES (1, 'fortune: No such file or directory');
 INSERT INTO "Fortune" (id, message) VALUES (2, 'A computer scientist is someone who fixes things that aren''t broken.');

+ 2 - 53
config/create.sql

@@ -3,59 +3,6 @@ DROP DATABASE IF EXISTS hello_world;
 CREATE DATABASE hello_world;
 USE hello_world;
 
-DROP TABLE IF EXISTS World;
-CREATE TABLE  World (
-  id int(10) unsigned NOT NULL auto_increment,
-  randomNumber int NOT NULL default 0,
-  PRIMARY KEY  (id)
-)
-ENGINE=INNODB;
-GRANT ALL ON hello_world.world TO 'benchmarkdbuser'@'%' IDENTIFIED BY 'benchmarkdbpass';
-GRANT ALL ON hello_world.world TO 'benchmarkdbuser'@'localhost' IDENTIFIED BY 'benchmarkdbpass';
-
-DROP PROCEDURE IF EXISTS load_data;
-
-DELIMITER #
-CREATE PROCEDURE load_data()
-BEGIN
-
-declare v_max int unsigned default 10000;
-declare v_counter int unsigned default 0;
-
-  TRUNCATE TABLE World;
-  START TRANSACTION;
-  while v_counter < v_max do
-    INSERT INTO World (randomNumber) VALUES ( floor(0 + (rand() * 10000)) );
-    SET v_counter=v_counter+1;
-  end while;
-  commit;
-END #
-
-DELIMITER ;
-
-CALL load_data();
-
-DROP TABLE IF EXISTS Fortune;
-CREATE TABLE  Fortune (
-  id int(10) unsigned NOT NULL auto_increment,
-  message varchar(2048) CHARACTER SET 'utf8' NOT NULL,
-  PRIMARY KEY  (id)
-)
-ENGINE=INNODB;
-
-INSERT INTO Fortune (message) VALUES ('fortune: No such file or directory');
-INSERT INTO Fortune (message) VALUES ('A computer scientist is someone who fixes things that aren''t broken.');
-INSERT INTO Fortune (message) VALUES ('After enough decimal places, nobody gives a damn.');
-INSERT INTO Fortune (message) VALUES ('A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
-INSERT INTO Fortune (message) VALUES ('A computer program does what you tell it to do, not what you want it to do.');
-INSERT INTO Fortune (message) VALUES ('Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
-INSERT INTO Fortune (message) VALUES ('Any program that runs right is obsolete.');
-INSERT INTO Fortune (message) VALUES ('A list is only as strong as its weakest link. — Donald Knuth');
-INSERT INTO Fortune (message) VALUES ('Feature: A bug with seniority.');
-INSERT INTO Fortune (message) VALUES ('Computers make very fast, very accurate mistakes.');
-INSERT INTO Fortune (message) VALUES ('<script>alert("This should not be displayed in a browser alert box.");</script>');
-INSERT INTO Fortune (message) VALUES ('フレームワークのベンチマーク');
-
 DROP TABLE IF EXISTS world;
 CREATE TABLE  world (
   id int(10) unsigned NOT NULL auto_increment,
@@ -63,6 +10,8 @@ CREATE TABLE  world (
   PRIMARY KEY  (id)
 )
 ENGINE=INNODB;
+GRANT SELECT, UPDATE ON hello_world.world TO 'benchmarkdbuser'@'%' IDENTIFIED BY 'benchmarkdbpass';
+GRANT SELECT, UPDATE ON hello_world.world TO 'benchmarkdbuser'@'localhost' IDENTIFIED BY 'benchmarkdbpass';
 
 DROP PROCEDURE IF EXISTS load_data;
 

+ 1 - 1
config/travis_setup.sh

@@ -83,7 +83,7 @@ echo "Populating Postgres database"
 psql --version
 sudo useradd benchmarkdbuser -p benchmarkdbpass
 sudo -u postgres psql template1 < config/create-postgres-database.sql
-sudo -u benchmarkdbuser psql hello_world < config/create-postgres.sql
+sudo -u postgres psql hello_world < config/create-postgres.sql
 sudo sed -i "s|#listen_addresses = 'localhost'|listen_addresses = '*'|g" /etc/postgresql/9.3/main/postgresql.conf
 sudo sed -i 's|max_connections = 255|max_connections = 500|g' /etc/postgresql/9.3/main/postgresql.conf
 sudo service postgresql stop

+ 3 - 3
frameworks/CSharp/aspnetcore/benchmark_config.json

@@ -7,7 +7,7 @@
       "plaintext_url": "/plaintext",
       "port": 8080,
       "approach": "Realistic",
-      "classification": "Fullstack",
+      "classification": "Micro",
       "database": "None",
       "framework": "aspnetcore",
       "language": "C#",
@@ -45,7 +45,7 @@
       "plaintext_url": "/plaintext",
       "port": 8080,
       "approach": "Realistic",
-      "classification": "Fullstack",
+      "classification": "Micro",
       "database": "None",
       "framework": "aspnetcore",
       "language": "C#",
@@ -83,7 +83,7 @@
       "plaintext_url": "/plaintext",
       "port": 8080,
       "approach": "Realistic",
-      "classification": "Fullstack",
+      "classification": "Micro",
       "database": "None",
       "framework": "aspnetcore",
       "language": "C#",

+ 1 - 1
frameworks/CSharp/aspnetcore/run-linux.sh

@@ -5,4 +5,4 @@ sudo apt-get install unzip libunwind8 -y
 cd Benchmarks
 dotnet restore
 dotnet build -c Release -f netcoreapp1.0
-dotnet run -c Release server.urls=http://*:8080 scenarios=$1 server=kestrel threadCount=8 NonInteractive=true &
+dotnet run -c Release server.urls=http://*:8080 scenarios=$1 server=kestrel threadCount=1 NonInteractive=true &

+ 1 - 1
frameworks/CSharp/aspnetcore/run-windows.ps1

@@ -5,4 +5,4 @@ $scenarios = (-split $scenarios) -join ","
 cd Benchmarks
 dotnet restore
 dotnet build -c Release -f netcoreapp1.0
-Start-Process -NoNewWindow dotnet "run -c Release server.urls=http://*:8080 server=$server threadCount=8 NonInteractive=true scenarios=$scenarios"
+Start-Process -NoNewWindow dotnet "run -c Release server.urls=http://*:8080 server=$server threadCount=1 NonInteractive=true scenarios=$scenarios"

+ 1 - 1
frameworks/Elixir/phoenix/lib/hello/repo.ex

@@ -1,3 +1,3 @@
 defmodule Hello.Repo do
-    use Ecto.Repo, otp_app: :hello
+  use Ecto.Repo, otp_app: :hello
 end

+ 6 - 7
frameworks/Elixir/phoenix/mix.exs

@@ -3,8 +3,8 @@ defmodule Hello.Mixfile do
 
   def project do
    [app: :hello,
-    version: "0.0.1",
-    elixir: "~> 1.1",
+    version: "0.1.0",
+    elixir: "~> 1.3",
     elixirc_paths: elixirc_paths(Mix.env),
     compilers: [:phoenix] ++ Mix.compilers,
     build_embedded: Mix.env == :prod,
@@ -26,12 +26,11 @@ defmodule Hello.Mixfile do
   #
   # Type `mix help deps` for examples and options
   defp deps do
-    [{:phoenix, "~> 1.0.3"},
-     {:phoenix_ecto, "~> 1.1"},
+    [{:phoenix, "~> 1.2"},
+     {:phoenix_ecto, "~> 3.0"},
      {:postgrex, ">= 0.0.0"},
      {:cowboy, "~> 1.0.0"},
-     {:phoenix_html, "~> 2.1"},
-     {:phoenix_live_reload, "~> 1.0", only: :dev},
-     {:exrm, "~> 0.19.8"}]
+     {:phoenix_html, "~> 2.6"},
+     {:phoenix_live_reload, "~> 1.0", only: :dev}]
   end
 end

+ 3 - 2
frameworks/Elixir/phoenix/setup.sh

@@ -8,7 +8,8 @@ rm -rf _build deps
 
 export MIX_ENV=prod
 mix local.hex --force
-mix deps.get --force
+mix local.rebar --force
+mix deps.get --force --only prod
 mix compile --force
 
-elixir --detached -S mix phoenix.server
+elixir --erl "+K true" --detached  -pa _build/prod/consolidated -S mix phoenix.server

+ 30 - 10
frameworks/Elixir/phoenix/web/controllers/page_controller.ex

@@ -4,16 +4,22 @@ defmodule Hello.PageController do
   alias Hello.Fortune
 
   def index(conn, _params) do
-    json conn, %{"TE Benchmarks\n" => "Started"}
+    conn
+    |> merge_resp_headers(%{"content-type" => "application/json"})
+    |> json(%{"TE Benchmarks\n" => "Started"})
   end
 
   # avoid namespace collision
   def _json(conn, _params) do
-    json conn, %{message: "Hello, world!"}
+    conn
+    |> merge_resp_headers(%{"content-type" => "application/json"})
+    |> json(%{message: "Hello, world!"})
   end
 
   def db(conn, _params) do
-    json conn, Repo.get(World, :random.uniform(10000))
+    conn
+    |> merge_resp_headers(%{"content-type" => "application/json"})
+    |> json(Repo.get(World, :rand.uniform(10000)))
   end
 
   def queries(conn, params) do
@@ -26,11 +32,20 @@ defmodule Hello.PageController do
     rescue
       ArgumentError -> 1
     end
-    json conn, Enum.map(1..q, fn _ -> Repo.get(World, :random.uniform(10000)) end)
+
+    conn
+    |> merge_resp_headers(%{"content-type" => "application/json"})
+    |> json(Enum.map(1..q, fn _ -> Repo.get(World, :rand.uniform(10000)) end))
   end
 
   def fortunes(conn, _params) do
-    fortunes = List.insert_at(Repo.all(Fortune), 0, %Fortune{:id => 0, :message  => "Additional fortune added at request time."})
+    additional_fortune = %Fortune{
+      id: 0,
+      message: "Additional fortune added at request time."
+    }
+
+    fortunes = [additional_fortune | Repo.all(Fortune)]
+
     render conn, "fortunes.html", fortunes: Enum.sort(fortunes, fn f1, f2 -> f1.message < f2.message end)
   end
 
@@ -44,14 +59,19 @@ defmodule Hello.PageController do
     rescue
       ArgumentError -> 1
     end
-    json conn, Enum.map(1..q, fn _ ->
-      w = Repo.get(World, :random.uniform(10000))
-      changeset = World.changeset(w, %{randomNumber: :random.uniform(10000)})
+
+    conn
+    |> merge_resp_headers(%{"content-type" => "application/json"})
+    |> json(Enum.map(1..q, fn _ ->
+      w = Repo.get(World, :rand.uniform(10000))
+      changeset = World.changeset(w, %{randomNumber: :rand.uniform(10000)})
       Repo.update(changeset)
-      w end)
+      w end))
   end
 
   def plaintext(conn, _params) do
-    text conn, "Hello, world!"
+    conn
+    |> merge_resp_headers(%{"content-type" => "text/plain"})
+    |> text("Hello, world!")
   end
 end

+ 3 - 3
frameworks/Elixir/phoenix/web/models/fortune.ex

@@ -6,11 +6,11 @@ defmodule Hello.Fortune do
     field :message, :string
   end
 
-  @required_fields ~w(message)
+  @required_fields ~w(message)a
   @optional_fields ~w()
 
-  def changeset(model, params \\ nil) do
+  def changeset(model, params \\ %{}) do
     model
-    |> cast(params, @required_fields, @optional_fields)
+    |> cast(params, @required_fields)
   end
 end

+ 3 - 3
frameworks/Elixir/phoenix/web/models/world.ex

@@ -6,11 +6,11 @@ defmodule Hello.World do
     field :randomnumber, :integer
   end
 
-  @required_fields ~w(randomnumber)
+  @required_fields ~w(randomnumber)a
   @optional_fields ~w()
 
-  def changeset(model, params \\ nil) do
+  def changeset(model, params \\ %{}) do
     model
-    |> cast(params, @required_fields, @optional_fields)
+    |> cast(params, @required_fields)
   end
 end

+ 1 - 1
frameworks/Elixir/phoenix/web/templates/layout/app.html.eex

@@ -1 +1 @@
-<!DOCTYPE html><html lang="en"><head><title>Fortunes</title></head><body><%= @inner %></body></html>
+<!DOCTYPE html><html lang="en"><head><title>Fortunes</title></head><body><%= render @view_module, @view_template, assigns %></body></html>

+ 10 - 6
frameworks/Elixir/phoenix/web/web.ex

@@ -14,7 +14,11 @@ defmodule Hello.Web do
 
   def model do
     quote do
-      use Ecto.Model
+      use Ecto.Schema
+
+      import Ecto
+      import Ecto.Changeset
+      import Ecto.Query
     end
   end
 
@@ -24,7 +28,7 @@ defmodule Hello.Web do
 
       # Alias the data repository and import query/model functions
       alias Hello.Repo
-      import Ecto.Model
+      import Ecto
       import Ecto.Query
 
       # Import URL helpers from the router
@@ -40,11 +44,11 @@ defmodule Hello.Web do
       import Phoenix.Controller, only: [get_csrf_token: 0, get_flash: 2,
                                         action_name: 1, controller_module: 1]
 
-      # Import URL helpers from the router
-      import Hello.Router.Helpers
 
       # Import all HTML functions (forms, tags, etc)
       use Phoenix.HTML
+
+      import Hello.Router.Helpers
     end
   end
 
@@ -60,8 +64,8 @@ defmodule Hello.Web do
       use Phoenix.Channel
       # Alias the data repository and import query/model functions
       alias Hello.Repo
-      import Ecto.Model
-      import Ecto.Query, only: [from: 2]
+      import Ecto
+      import Ecto.Query
     end
   end
 

+ 0 - 8
frameworks/Erlang/misultin/.gitignore

@@ -1,8 +0,0 @@
-.eunit
-deps
-ebin
-*.o
-*.beam
-*.plt
-erl_crash.dump
-/.rebar/

+ 0 - 13
frameworks/Erlang/misultin/Makefile

@@ -1,13 +0,0 @@
-REBAR=./rebar
-
-all:
-	@$(REBAR) -r get-deps compile
-
-clean:
-	@$(REBAR) clean
-
-run:
-	@./start.sh
-
-stop:
-	@killall beam.smp

+ 0 - 23
frameworks/Erlang/misultin/benchmark_config.json

@@ -1,23 +0,0 @@
-{
-  "framework": "misultin",
-  "tests": [{
-    "default": {
-      "setup_file": "setup",
-      "json_url": "/json",
-      "plaintext_url": "/plaintext",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Platform",
-      "database": "MySQL",
-      "framework": "Misultin",
-      "language": "Erlang",
-      "orm": "Raw",
-      "platform": "Erlang",
-      "webserver": "None",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "misultin",
-      "notes": "",
-      "versus": ""
-  }}]
-}

+ 0 - 9
frameworks/Erlang/misultin/priv/app.config

@@ -1,9 +0,0 @@
-%% -*- erlang -*-
-[{misultin_bench, [{http_port, 8080}]},
-
- {erl_bench, [{db_pool, 256},
-              {db_user, "benchmarkdbuser"},
-              {db_password, "benchmarkdbpass"},
-              {db_host, "localhost"},
-              {db_port, 3306},
-              {db_name, "hello_world"}]}].

+ 0 - 5
frameworks/Erlang/misultin/rebar.config

@@ -1,5 +0,0 @@
-%% -*- erlang -*-
-{deps, [
-  {erl_bench, ".*", {git, "git://github.com/utkarshkukreti/erl_bench.git", "cb70233d7de1e800893cf1460f181a706aa08a38"}},
-  {misultin, "0.9", {git, "git://github.com/ostinelli/misultin.git", {tag, "misultin-0.9"}}}
-]}.

+ 0 - 11
frameworks/Erlang/misultin/setup.sh

@@ -1,11 +0,0 @@
-#!/bin/bash
-
-sed -i 's|"benchmarkdbpass", ".*", 3306|"benchmarkdbpass", "'"${DBHOST}"'", 3306|g' src/misultin_bench_sup.erl
-
-fw_depends erlang
-
-rm -rf deps/* ebin/*
-rebar get-deps
-rebar compile
-
-erl +K true +sbwt very_long +swt very_low -pa ebin deps/*/ebin -boot start_sasl -config priv/app.config -s misultin_bench_app -noshell -detached

+ 0 - 9
frameworks/Erlang/misultin/src/misultin_bench.app.src

@@ -1,9 +0,0 @@
-%% -*- erlang -*-
-{application, misultin_bench,
- [{description, ""},
-  {vsn, "0.1"},
-  {modules, []},
-  {registered, []},
-  {mod, {misultin_bench_app, []}},
-  {env, []},
-  {applications, [kernel, stdlib, crypto, erl_bench]}]}.

+ 0 - 16
frameworks/Erlang/misultin/src/misultin_bench_app.erl

@@ -1,16 +0,0 @@
--module(misultin_bench_app).
--behaviour(application).
--export([start/0]).
--export([start/2, stop/1]).
-
-start() ->
-    application:ensure_all_started(misultin_bench).
-
-start(_Type, _StartArgs) ->
-    {ok, Port} = application:get_env(misultin_bench, http_port),
-    Options = [{loop, fun(Req) -> web_handler:dispatch(Req) end},
-               {port, Port}],
-    misultin_bench_sup:start_link(Options).
-
-stop(_State) ->
-    ok.

+ 0 - 18
frameworks/Erlang/misultin/src/misultin_bench_sup.erl

@@ -1,18 +0,0 @@
--module(misultin_bench_sup).
--behaviour(supervisor).
--export([start_link/1]).
--export([init/1]).
-
-start_link(Options) ->
-    supervisor:start_link(?MODULE, [Options]).
-
-init([Options]) ->
-    Misultin = supervisor(misultin, Options),
-    Processes = [Misultin],
-    Strategy = {one_for_one, 5, 30},
-    {ok, {Strategy, Processes}}.
-
-supervisor(Mod, Options) ->
-    {Mod,
-     {Mod, start_link, [Options]},
-     permanent, infinity, supervisor, [Mod]}.

+ 0 - 53
frameworks/Erlang/misultin/src/web_handler.erl

@@ -1,53 +0,0 @@
--module(web_handler).
--export([dispatch/1]).
-
-dispatch(Req) ->
-    Method = Req:get(method),
-    {_UriType, Uri} = Req:get(uri),
-    Path = string:tokens(Uri, "/"),
-    handle(Method, Path, Req).
-
-%% handle
-
-handle('GET', ["json"], Req) ->
-    json(Req, erl_bench:hello_json());
-
-handle('GET', ["plaintext"], Req) ->
-    plain(Req, erl_bench:hello_plain());
-
-handle('GET', ["db"], Req) ->
-    json(Req, erl_bench:random_json());
-
-handle('GET', ["queries"], Req) ->
-    Queries = queries(Req),
-    json(Req, erl_bench:randoms_json(Queries));
-
-handle('GET', ["updates"], Req) ->
-    Queries = queries(Req),
-    json(Req, erl_bench:update_randoms_json(Queries));
-
-handle('GET', ["fortunes"], Req) ->
-    html(Req, erl_bench:fortunes_html());
-
-handle(_Method, _Path, Req) ->
-    Req:respond(404, [{"Content-Type", "text/plain"}], "Not Found").
-
-%% private
-
-json(Req, Json) ->
-    Req:ok([{"Content-Type", "application/json"}], Json).
-
-plain(Req, Text) ->
-    Req:ok([{"Content-Type", "text/plain"}], Text).
-
-html(Req, Html) ->
-    Req:ok([{"Content-Type", "text/html"}], Html).
-
-queries(Req) ->
-    Params = Req:parse_qs(),
-    Queries = (catch list_to_integer(proplists:get_value("queries", Params, "1"))),
-    case {is_number(Queries), Queries > 500} of
-        {true, true} -> 500;
-        {false, _}   -> 1;
-        _ -> Queries
-    end.

+ 0 - 7
frameworks/Erlang/misultin/start-dev.sh

@@ -1,7 +0,0 @@
-#!/bin/sh
-exec erl \
-     +K true +sbwt very_long +swt very_low \
-     -pa ebin deps/*/ebin \
-     -boot start_sasl \
-     -config priv/app.config \
-     -s misultin_bench_app

+ 6 - 6
frameworks/JavaScript/nodejs/README.md

@@ -13,13 +13,13 @@ The logic for the test cases live in these.
 
 ## Infrastructure Software Versions
 The tests were run with:
-* [Node.js v0.12.2](http://nodejs.org/)
+* [Node.js v6.3.0](http://nodejs.org/)
 
-* [Node MySQL 2.7.0](https://github.com/felixge/node-mysql/)
-* [Sequelize 3.1.1](https://github.com/sequelize/sequelize)
-* [Node MongoDB Driver 2.0.33](https://github.com/mongodb/node-mongodb-native)
-* [Mongoose 4.0.4](http://mongoosejs.com/)
-* [Node Redis 0.12.1](https://github.com/mranney/node_redis)
+* [Node MySQL 2.11.1](https://github.com/felixge/node-mysql/)
+* [Sequelize 3.6.0](https://github.com/sequelize/sequelize)
+* [Node MongoDB Driver 2.1.1](https://github.com/mongodb/node-mongodb-native)
+* [Mongoose 4.5.3](http://mongoosejs.com/)
+* [Node Redis 2.6.2](https://github.com/mranney/node_redis)
 * [Hiredis 0.4.0 (C lib for Redis)](https://github.com/redis/hiredis)
 
 ## Test URLs

+ 0 - 21
frameworks/JavaScript/ringojs/benchmark_config.json

@@ -12,27 +12,6 @@
       "port": 8080,
       "approach": "Realistic",
       "classification": "Platform",
-      "database": "None",
-      "framework": "ringo",
-      "language": "JavaScript",
-      "orm": "Raw",
-      "platform": "ringojs",
-      "webserver": "Jetty",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "ringojs",
-      "notes": "",
-      "versus": ""
-    },
-    "raw": {
-      "setup_file": "setup",
-      "db_url": "/db",
-      "query_url": "/db?queries=",
-      "fortune_url": "/fortune",
-      "update_url": "/updates?queries=",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Platform",
       "database": "MySQL",
       "framework": "ringo",
       "language": "JavaScript",

+ 0 - 10
frameworks/PHP/micromvc/.gitignore

@@ -1,10 +0,0 @@
-/app/cache
-/app/logs
-/bin
-/vendors
-/build
-/dist
-.DS_Store
-/tags
-.idea
-/deploy/php-fpm.pid

+ 0 - 92
frameworks/PHP/micromvc/Bootstrap.php

@@ -1,92 +0,0 @@
-<?php
-/**
- * Bootstrap
- *
- * This file contains initialization code run immediately after system startup.
- * Setup i18n and l10n handling, configure system, prepare event hooks.
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2010 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-
-// System Start Time
-define('START_TIME', microtime(true));
-
-// System Start Memory
-define('START_MEMORY_USAGE', memory_get_usage());
-
-// Extension of all PHP files
-define('EXT', '.php');
-
-// Directory separator (Unix-Style works on all OS)
-define('DS', '/');
-
-// Absolute path to the system folder
-define('SP', realpath(__DIR__). DS);
-
-// Is this an AJAX request?
-define('AJAX_REQUEST', strtolower(getenv('HTTP_X_REQUESTED_WITH')) === 'xmlhttprequest');
-
-// The current TLD address, scheme, and port
-define('DOMAIN', (strtolower(getenv('HTTPS')) == 'on' ? 'https' : 'http') . '://'
-	. getenv('HTTP_HOST') . (($p = getenv('SERVER_PORT')) != 80 AND $p != 443 ? ":$p" : ''));
-
-// The current site path
-define('PATH', parse_url(getenv('REQUEST_URI'), PHP_URL_PATH));
-
-require(SP . 'vendor/autoload' . EXT);
-
-// Include common system functions
-require(SP . 'Common' . EXT);
-
-\Micro\View::$directory = SP . 'View/';
-
-\Micro\Cookie::$settings = config()->cookie;
-
-// Register events
-foreach(config()->events as $event => $class)
-{
-	event($event, NULL, $class);
-}
-
-/*
-if(preg_match_all('/[\-a-z]{2,}/i', getenv('HTTP_ACCEPT_LANGUAGE'), $locales))
-{
-	$locales = $locales[0];
-}
-*/
-
-// Get locale from user agent
-if(isset($_COOKIE['lang']))
-{
-	$preference = $_COOKIE['lang'];
-}
-else
-{
-	$preference = Locale::acceptFromHttp(getenv('HTTP_ACCEPT_LANGUAGE'));
-}
-
-// Match preferred language to those available, defaulting to generic English
-$locale = Locale::lookup(config()->languages, $preference, false, 'en');
-
-// Default Locale
-Locale::setDefault($locale);
-setlocale(LC_ALL, $locale . '.utf-8');
-//putenv("LC_ALL", $locale);
-
-// Default timezone of server
-date_default_timezone_set('UTC');
-
-// iconv encoding
-iconv_set_encoding("internal_encoding", "UTF-8");
-
-// multibyte encoding
-mb_internal_encoding('UTF-8');
-
-// Enable global error handling
-set_error_handler(array('\Micro\Error', 'handler'));
-register_shutdown_function(array('\Micro\Error', 'fatal'));
-

+ 0 - 41
frameworks/PHP/micromvc/CLI

@@ -1,41 +0,0 @@
-<?php if(PHP_SAPI !== 'cli') die();
-/**
- * CLI
- *
- * This file is the command-line interface (CLI) entry point for the system
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2010 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-
-// Include bootstrap
-require('Bootstrap.php');
-
-// Require a CLI path
-if(empty($argv[1]))
-{
-	die("Please enter a path to the CLI file.\nExample: " . colorize('php cli file.php', 'blue') . "\n");
-}
-
-// Build path to file
-$file = SP . 'Command/' . str_replace(EXT, '', trim($argv[1], '/')) . EXT;
-
-// Does the file exist?
-if( ! is_file($file)) die("Please enter a valid file path\n");
-
-// Require a valid, safe path
-if( ! preg_match('/^[\w\-~\/\.+]{1,600}/', $argv[1])) die(colorize("Invalid path given", 'red'). "\n");
-
-try
-{
-	require($file);
-}
-catch (Exception $e)
-{
-	\Micro\Error::exception($e);
-}
-
-// End

+ 0 - 28
frameworks/PHP/micromvc/Class/Controller/Benchmark/Db.php

@@ -1,28 +0,0 @@
-<?php
-
-namespace Controller\Benchmark;
-
-use Model\Benchmark\World;
-
-class Db extends \MyController
-{
-    public function run()
-    {
-        $queries = get('queries', 1);
-        $this->worlds = array();
-        $this->load_database();
-
-        for ($i = 0; $i < $queries; ++$i) {
-            $this->worlds[] = World::row(array('id' => mt_rand(1, 10000)))->to_array();
-        }
-
-        if ($queries == 1) {
-            $this->worlds = $this->worlds[0];
-        }
-    }
-
-    public function send() {
-        headers_sent() OR header('Content-type: application/json');
-        echo json_encode($this->worlds);
-    }
-}

+ 0 - 14
frameworks/PHP/micromvc/Class/Controller/Benchmark/Json.php

@@ -1,14 +0,0 @@
-<?php
-
-namespace Controller\Benchmark;
-
-class Json extends \MyController
-{
-    public function run(){}
-
-    public function send()
-    {
-        headers_sent() OR header('Content-type: application/json');
-        echo json_encode(array('message' => 'Hello, World!'));
-    }
-}

+ 0 - 21
frameworks/PHP/micromvc/Class/Controller/Index.php

@@ -1,21 +0,0 @@
-<?php
-
-namespace Controller;
-
-class Index extends \MyController
-{
-	public function run()
-	{
-		// Load database
-		//$this->db = new DB(config('database'));
-
-		// Set ORM database connection
-		//ORM::$db = $this->db;
-
-		// Load the theme sidebar since we don't need the full page
-		$this->sidebar = new \Micro\View('Sidebar');
-
-		// Load the welcome view
-		$this->content = new \Micro\View('Index/Index');
-	}
-}

+ 0 - 19
frameworks/PHP/micromvc/Class/Controller/Page404.php

@@ -1,19 +0,0 @@
-<?php
-/**
- * 404 Page
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2011 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-namespace Controller;
-
-class Page404 extends \MyController
-{
-	public function run()
-	{
-		$this->show_404();
-	}
-}

+ 0 - 153
frameworks/PHP/micromvc/Class/Controller/School.php

@@ -1,153 +0,0 @@
-<?php
-/**
- * School
- *
- * Shows an example of a school system using the ORM
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2011 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-namespace Controller;
-
-class School extends \MyController
-{
-
-	public function run()
-	{
-		$this->load_database();
-
-		// You can over-ride this in certain models if needed,
-		// allowing you to use multiple databases.
-		// Model_Name::$db = new DB(config('other_database'));
-
-		// New Dorm
-		$d = new \Model\Dorm();
-		$d->name = 'Dorm 1';
-		$d->save();
-
-		// New Student in Dorm
-		$s1 = new \Model\Student();
-		$s1->name = 'Mary';
-		$s1->dorm_id = $d->id;
-		$s1->save();
-
-		// New Student in Dorm
-		$s2 = new \Model\Student();
-		$s2->name = 'Jane';
-		$s2->dorm_id = $d->id;
-		$s2->save();
-
-		// New Car for student
-		$c = new \Model\Car();
-		$c->name = 'Truck';
-		$c->student_id = $s1->id;
-		$c->save(); // Insert
-
-		$c->name = $s1->name. '\'s Truck'; // Change car name
-		$c->save(); // Update
-
-		// New Softball club
-		$c = new \Model\Club();
-		$c->name = 'Softball';
-		$c->save();
-
-		// Mary is in softball
-		$m = new \Model\Membership();
-		$m->club_id = $c->id;
-		$m->student_id = $s1->id;
-		$m->save();
-
-		// Jane is in softball
-		$m = new \Model\Membership();
-		$m->club_id = $c->id;
-		$m->student_id = $s2->id;
-		$m->save();
-
-		$this->content = dump('Created school objects');
-
-		$clubs = \Model\Club::fetch();
-		foreach($clubs as $club)
-		{
-			$club->load();
-			foreach($club->students() as $student)
-			{
-				/*
-				 * This student may have already been removed
-				 */
-				if($student->load())
-				{
-					$this->content .= dump('Removing '. $student->name. ' and her records');
-
-					// Remove their car, club membership, and them
-					$student->delete();
-				}
-			}
-			$club->delete();
-		}
-
-		foreach(\Model\Dorm::fetch() as $dorm)
-		{
-			$this->content .= dump('Removing the '. $dorm->name. ' dorm');
-			$dorm->delete(); // Delete the dorm
-		}
-
-		$this->content .= dump('Removed school objects');
-
-		// Load the view file
-		$this->content .= new \Micro\View('School/Index');
-
-		// Load global theme sidebar
-		$this->sidebar = new \Micro\View('Sidebar');
-
-	}
-}
-
-/* Table Schema:
-
-CREATE TABLE IF NOT EXISTS `car` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `name` varchar(100) DEFAULT NULL,
-  `student_id` int(11) DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  KEY `student_id` (`student_id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ;
-
--- --------------------------------------------------------
-
-CREATE TABLE IF NOT EXISTS `club` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `name` varchar(100) DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ;
-
--- --------------------------------------------------------
-
-CREATE TABLE IF NOT EXISTS `dorm` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `name` varchar(100) DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ;
-
--- --------------------------------------------------------
-
-CREATE TABLE IF NOT EXISTS `membership` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `club_id` int(11) DEFAULT NULL,
-  PRIMARY KEY (`id`),
-  KEY `club_id` (`club_id`),
-  KEY `student_id` (`student_id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ;
-
--- --------------------------------------------------------
-
-CREATE TABLE IF NOT EXISTS `student` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
-  `dorm_id` smallint(6) DEFAULT NULL,
-  `name` varchar(100) DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ;
-
-*/

+ 0 - 8
frameworks/PHP/micromvc/Class/Model/Benchmark/World.php

@@ -1,8 +0,0 @@
-<?php
-
-namespace Model\Benchmark;
-
-class World extends \Micro\ORM
-{
-    public static $table = 'World';
-}

+ 0 - 22
frameworks/PHP/micromvc/Class/Model/Car.php

@@ -1,22 +0,0 @@
-<?php
-/**
- * Car Model
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2011 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-namespace Model;
-
-class Car extends \Micro\ORM
-{
-	public static $table = 'car';
-	public static $foreign_key = 'car_id';
-
-	public static $belongs_to = array(
-		'student' => '\Model\Student',
-	);
-
-}

+ 0 - 28
frameworks/PHP/micromvc/Class/Model/Club.php

@@ -1,28 +0,0 @@
-<?php
-/**
- * Club Model
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2011 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-namespace Model;
-
-class Club extends \Micro\ORM
-{
-	public static $table = 'club';
-	public static $foreign_key = 'club_id';
-
-	public static $has = array(
-		'memberships' => '\Model\Membership'
-	);
-
-	public static $has_many_through = array(
-		'students' => array(
-			'club_id' => '\Model\Membership',
-			'student_id' => '\Model\Student'
-		),
-	);
-}

+ 0 - 22
frameworks/PHP/micromvc/Class/Model/Dorm.php

@@ -1,22 +0,0 @@
-<?php
-/**
- * Dorm Model
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2011 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-namespace Model;
-
-class Dorm extends \Micro\ORM
-{
-	public static $table = 'dorm';
-	public static $foreign_key = 'dorm_id';
-
-	public static $has = array(
-		'students' => '\Model\Student',
-	);
-
-}

+ 0 - 22
frameworks/PHP/micromvc/Class/Model/Membership.php

@@ -1,22 +0,0 @@
-<?php
-/**
- * Membership Model
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2011 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-namespace Model;
-
-class Membership extends \Micro\ORM
-{
-	public static $table = 'membership';
-	public static $foreign_key = 'membership_id';
-
-	public static $belongs_to = array(
-		'student' => '\Model\Student',
-		'club' => '\Model\Club',
-	);
-}

+ 0 - 34
frameworks/PHP/micromvc/Class/Model/Student.php

@@ -1,34 +0,0 @@
-<?php
-/**
- * Student Model
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2011 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-namespace Model;
-
-class Student extends \Micro\ORM
-{
-	public static $table = 'student';
-	public static $foreign_key = 'student_id';
-	public static $cascade_delete = TRUE;
-
-	public static $has = array(
-		'car' => '\Model\Car',
-		'memberships' => '\Model\Membership'
-	);
-
-	public static $belongs_to = array(
-		'dorm' => '\Model\Dorm',
-	);
-
-	public static $has_many_through = array(
-		'clubs' => array(
-			'student_id' => '\Model\Membership',
-			'club_id' => '\Model\Club'
-		),
-	);
-}

+ 0 - 80
frameworks/PHP/micromvc/Class/MyController.php

@@ -1,80 +0,0 @@
-<?php
-/**
- * MyController
- *
- * Basic DEMO outline for standard controllers
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2011 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-abstract class MyController extends \Micro\Controller
-{
-	// Global view template
-	public $template = 'Layout';
-
-	/**
-	 * Called after the controller is loaded, before the method
-	 *
-	 * @param string $method name
-	 */
-	public function initialize($method)
-	{
-		\Micro\Session::start();
-	}
-
-
-	/**
-	 * Load database connection
-	 */
-	public function load_database($name = 'database')
-	{
-		// Load database
-		$db = new \Micro\Database(config()->$name);
-
-		// Set default ORM database connection
-		if(empty(\Micro\ORM::$db))
-		{
-			\Micro\ORM::$db = $db;
-		}
-
-		return $db;
-	}
-
-
-	/**
-	 * Show a 404 error page
-	 */
-	public function show_404()
-	{
-		headers_sent() OR header('HTTP/1.0 404 Page Not Found');
-		$this->content = new \Micro\View('404');
-	}
-
-
-	/**
-	 * Save user session and render the final layout template
-	 */
-	public function send()
-	{
-		\Micro\Session::save();
-
-		headers_sent() OR header('Content-Type: text/html; charset=utf-8');
-
-		$layout = new \Micro\View($this->template);
-		$layout->set((array) $this);
-		print $layout;
-
-		$layout = NULL;
-
-		if(config()->debug_mode)
-		{
-			print new \Micro\View('System/Debug');
-		}
-	}
-
-}
-
-// End

+ 0 - 25
frameworks/PHP/micromvc/Command/Backup.php

@@ -1,25 +0,0 @@
-<?php
-
-// Start database connection
-$db = new \Micro\Database(config()->database);
-
-// Connect to databse server
-$db->connect();
-
-// Set name of migration object
-$migration = '\Micro\Migration\\' . ($db->type == 'mysql' ? 'MySQL' : 'PGSQL');
-
-// Create migration object
-$migration = new $migration;
-
-// Set database connection
-$migration->db = $db;
-
-// Set the database name
-$migration->name = 'default';
-
-// Load table configuration
-$migration->tables = config('Migration');
-
-// Backup existing database table
-$migration->backup_data();

+ 0 - 25
frameworks/PHP/micromvc/Command/Create.php

@@ -1,25 +0,0 @@
-<?php
-
-// Start database connection
-$db = new \Micro\Database(config()->database);
-
-// Connect to databse server
-$db->connect();
-
-// Set name of migration object
-$migration = '\Micro\Migration\\' . ($db->type == 'mysql' ? 'MySQL' : 'PGSQL');
-
-// Create migration object
-$migration = new $migration;
-
-// Set database connection
-$migration->db = $db;
-
-// Set the database name
-$migration->name = 'default';
-
-// Load table configuration
-$migration->tables = config('Migration');
-
-// Backup existing database table
-$migration->create_schema();

+ 0 - 25
frameworks/PHP/micromvc/Command/Restore.php

@@ -1,25 +0,0 @@
-<?php
-
-// Start database connection
-$db = new \Micro\Database(config()->database);
-
-// Connect to databse server
-$db->connect();
-
-// Set name of migration object
-$migration = '\Micro\Migration\\' . ($db->type == 'mysql' ? 'MySQL' : 'PGSQL');
-
-// Create migration object
-$migration = new $migration;
-
-// Set database connection
-$migration->db = $db;
-
-// Set the database name
-$migration->name = 'default';
-
-// Load table configuration
-$migration->tables = config('Migration');
-
-// Backup existing database table
-$migration->restore_data();

+ 0 - 27
frameworks/PHP/micromvc/Command/Run.php

@@ -1,27 +0,0 @@
-<?php
-
-// Start database connection
-$db = new \Micro\Database(config()->database);
-
-// Connect to databse server
-$db->connect();
-
-// Set name of migration object
-$migration = '\Micro\Migration\\' . ($db->type == 'mysql' ? 'MySQL' : 'PGSQL');
-
-// Create migration object
-$migration = new $migration;
-
-// Set database connection
-$migration->db = $db;
-
-// Set the database name
-$migration->name = 'default';
-
-// Load table configuration
-$migration->tables  = config('Migration');
-
-// Backup existing database table
-$migration->backup_data();
-$migration->create_schema();
-$migration->restore_data();

+ 0 - 521
frameworks/PHP/micromvc/Common.php

@@ -1,521 +0,0 @@
-<?php
-/**
- * Core Bootstrap
- *
- * This file contains all common system functions and View and Controller classes.
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2011 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-
-
-/**
- * Attach (or remove) multiple callbacks to an event and trigger those callbacks when that event is called.
- *
- * @param string $event name
- * @param mixed $value the optional value to pass to each callback
- * @param mixed $callback the method or function to call - FALSE to remove all callbacks for event
- */
-function event($event, $value = NULL, $callback = NULL)
-{
-	static $events;
-
-	// Adding or removing a callback?
-	if($callback !== NULL)
-	{
-		if($callback)
-		{
-			$events[$event][] = $callback;
-		}
-		else
-		{
-			unset($events[$event]);
-		}
-	}
-	elseif(isset($events[$event])) // Fire a callback
-	{
-		foreach($events[$event] as $function)
-		{
-			$value = call_user_func($function, $value);
-		}
-		return $value;
-	}
-}
-
-
-/**
- * Fetch a config value from a module configuration file
- *
- * @param string $file name of the config
- * @param boolean $clear to clear the config object
- * @return object
- */
-function config($file = 'Config', $clear = FALSE)
-{
-	static $configs = array();
-
-	if($clear)
-	{
-		unset($configs[$file]);
-		return;
-	}
-
-	if(empty($configs[$file]))
-	{
-		//$configs[$file] = new \Micro\Config($file);
-		require(SP . 'Config/' . $file . EXT);
-		$configs[$file] = (object) $config;
-		//print dump($configs);
-	}
-
-	return $configs[$file];
-}
-
-
-/**
- * Return an HTML safe dump of the given variable(s) surrounded by "pre" tags.
- * You can pass any number of variables (of any type) to this function.
- *
- * @param mixed
- * @return string
- */
-function dump()
-{
-	$string = '';
-	foreach(func_get_args() as $value)
-	{
-		$string .= '<pre>' . h($value === NULL ? 'NULL' : (is_scalar($value) ? $value : print_r($value, TRUE))) . "</pre>\n";
-	}
-	return $string;
-}
-
-
-/**
- * Safely fetch a $_POST value, defaulting to the value provided if the key is
- * not found.
- *
- * @param string $key name
- * @param mixed $default value if key is not found
- * @param boolean $string TRUE to require string type
- * @return mixed
- */
-function post($key, $default = NULL, $string = FALSE)
-{
-	if(isset($_POST[$key]))
-	{
-		return $string ? (string)$_POST[$key] : $_POST[$key];
-	}
-	return $default;
-}
-
-
-/**
- * Safely fetch a $_GET value, defaulting to the value provided if the key is
- * not found.
- *
- * @param string $key name
- * @param mixed $default value if key is not found
- * @param boolean $string TRUE to require string type
- * @return mixed
- */
-function get($key, $default = NULL, $string = FALSE)
-{
-	if(isset($_GET[$key]))
-	{
-		return $string ? (string)$_GET[$key] : $_GET[$key];
-	}
-	return $default;
-}
-
-
-/**
- * Safely fetch a $_SESSION value, defaulting to the value provided if the key is
- * not found.
- *
- * @param string $k the post key
- * @param mixed $d the default value if key is not found
- * @return mixed
- */
-function session($k, $d = NULL)
-{
-	return isset($_SESSION[$k]) ? $_SESSION[$k] : $d;
-}
-
-
-/**
- * Create a random 32 character MD5 token
- *
- * @return string
- */
-function token()
-{
-	return md5(str_shuffle(chr(mt_rand(32, 126)) . uniqid() . microtime(TRUE)));
-}
-
-
-/**
- * Write to the application log file using error_log
- *
- * @param string $message to save
- * @return bool
- */
-function log_message($message)
-{
-	//$path = SP . 'Storage/Log/' . date('Y-m-d') . '.log';
-	$path = 'stderr';
-
-	// Append date and IP to log message
-	return error_log(date('H:i:s ') . getenv('REMOTE_ADDR') . " $message\n", 3, $path);
-}
-
-
-/**
- * Send a HTTP header redirect using "location" or "refresh".
- *
- * @param string $url the URL string
- * @param int $c the HTTP status code
- * @param string $method either location or redirect
- */
-function redirect($url = NULL, $code = 302, $method = 'location')
-{
-	if(strpos($url, '://') === FALSE)
-	{
-		$url = site_url($url);
-	}
-
-	//print dump($url);
-
-	header($method == 'refresh' ? "Refresh:0;url = $url" : "Location: $url", TRUE, $code);
-}
-
-
-/*
- * Return the full URL to a path on this site or another.
- *
- * @param string $uri may contain another sites TLD
- * @return string
- *
-function site_url($uri = NULL)
-{
-	return (strpos($uri, '://') === FALSE ? \Micro\URL::get() : '') . ltrim($uri, '/');
-}
-*/
-
-/**
- * Return the full URL to a location on this site
- *
- * @param string $path to use or FALSE for current path
- * @param array $params to append to URL
- * @return string
- */
-function site_url($path = NULL, array $params = NULL)
-{
-	// In PHP 5.4, http_build_query will support RFC 3986
-	return DOMAIN . ($path ? '/'. trim($path, '/') : PATH)
-		. ($params ? '?'. str_replace('+', '%20', http_build_query($params, TRUE, '&')) : '');
-}
-
-
-/**
- * Return the current URL with path and query params
- *
- * @return string
- *
-function current_url()
-{
-	return DOMAIN . getenv('REQUEST_URI');
-}
-*/
-
-/**
- * Convert a string from one encoding to another encoding
- * and remove invalid bytes sequences.
- *
- * @param string $string to convert
- * @param string $to encoding you want the string in
- * @param string $from encoding that string is in
- * @return string
- */
-function encode($string, $to = 'UTF-8', $from = 'UTF-8')
-{
-	// ASCII is already valid UTF-8
-	if($to == 'UTF-8' AND is_ascii($string))
-	{
-		return $string;
-	}
-
-	// Convert the string
-	return @iconv($from, $to . '//TRANSLIT//IGNORE', $string);
-}
-
-
-/**
- * Tests whether a string contains only 7bit ASCII characters.
- *
- * @param string $string to check
- * @return bool
- */
-function is_ascii($string)
-{
-	return ! preg_match('/[^\x00-\x7F]/S', $string);
-}
-
-
-/**
- * Encode a string so it is safe to pass through the URL
- *
- * @param string $string to encode
- * @return string
- */
-function base64_url_encode($string = NULL)
-{
-	return strtr(base64_encode($string), '+/=', '-_~');
-}
-
-
-/**
- * Decode a string passed through the URL
- *
- * @param string $string to decode
- * @return string
- */
-function base64_url_decode($string = NULL)
-{
-	return base64_decode(strtr($string, '-_~', '+/='));
-}
-
-
-/**
- * Convert special characters to HTML safe entities.
- *
- * @param string $string to encode
- * @return string
- */
-function h($string)
-{
-	return htmlspecialchars($string, ENT_QUOTES, 'utf-8');
-}
-
-
-/**
- * Filter a valid UTF-8 string so that it contains only words, numbers,
- * dashes, underscores, periods, and spaces - all of which are safe
- * characters to use in file names, URI, XML, JSON, and (X)HTML.
- *
- * @param string $string to clean
- * @param bool $spaces TRUE to allow spaces
- * @return string
- */
-function sanitize($string, $spaces = TRUE)
-{
-	$search = array(
-		'/[^\w\-\. ]+/u',			// Remove non safe characters
-		'/\s\s+/',					// Remove extra whitespace
-		'/\.\.+/', '/--+/', '/__+/'	// Remove duplicate symbols
-	);
-
-	$string = preg_replace($search, array(' ', ' ', '.', '-', '_'), $string);
-
-	if( ! $spaces)
-	{
-		$string = preg_replace('/--+/', '-', str_replace(' ', '-', $string));
-	}
-
-	return trim($string, '-._ ');
-}
-
-
-/**
- * Create a SEO friendly URL string from a valid UTF-8 string.
- *
- * @param string $string to filter
- * @return string
- */
-function sanitize_url($string)
-{
-	return urlencode(mb_strtolower(sanitize($string, FALSE)));
-}
-
-
-/**
- * Filter a valid UTF-8 string to be file name safe.
- *
- * @param string $string to filter
- * @return string
- */
-function sanitize_filename($string)
-{
-	return sanitize($string, FALSE);
-}
-
-
-/**
- * Return a SQLite/MySQL/PostgreSQL datetime string
- *
- * @param int $timestamp
- */
-function sql_date($timestamp = NULL)
-{
-	return date('Y-m-d H:i:s', $timestamp ?: time());
-}
-
-
-/**
- * Make a request to the given URL using cURL.
- *
- * @param string $url to request
- * @param array $options for cURL object
- * @return object
- */
-function curl_request($url, array $options = NULL)
-{
-	$ch = curl_init($url);
-
-	$defaults = array(
-		CURLOPT_HEADER => 0,
-		CURLOPT_RETURNTRANSFER => 1,
-		CURLOPT_TIMEOUT => 5,
-	);
-
-	// Connection options override defaults if given
-	curl_setopt_array($ch, (array) $options + $defaults);
-
-	// Create a response object
-	$object = new stdClass;
-
-	// Get additional request info
-	$object->response = curl_exec($ch);
-	$object->error_code = curl_errno($ch);
-	$object->error = curl_error($ch);
-	$object->info = curl_getinfo($ch);
-
-	curl_close($ch);
-
-	return $object;
-}
-
-
-/**
- * Create a RecursiveDirectoryIterator object
- *
- * @param string $dir the directory to load
- * @param boolean $recursive to include subfolders
- * @return object
- */
-function directory($dir, $recursive = TRUE)
-{
-	$i = new \RecursiveDirectoryIterator($dir);
-
-	if( ! $recursive) return $i;
-
-	return new \RecursiveIteratorIterator($i, \RecursiveIteratorIterator::SELF_FIRST);
-}
-
-
-/**
- * Make sure that a directory exists and is writable by the current PHP process.
- *
- * @param string $dir the directory to load
- * @param string $chmod value as octal
- * @return boolean
- */
-function directory_is_writable($dir, $chmod = 0755)
-{
-	// If it doesn't exist, and can't be made
-	if(! is_dir($dir) AND ! mkdir($dir, $chmod, TRUE)) return FALSE;
-
-	// If it isn't writable, and can't be made writable
-	if(! is_writable($dir) AND !chmod($dir, $chmod)) return FALSE;
-
-	return TRUE;
-}
-
-
-/**
- * Convert any given variable into a SimpleXML object
- *
- * @param mixed $object variable object to convert
- * @param string $root root element name
- * @param object $xml xml object
- * @param string $unknown element name for numeric keys
- * @param string $doctype XML doctype
- */
-function to_xml($object, $root = 'data', $xml = NULL, $unknown = 'element', $doctype = "<?xml version = '1.0' encoding = 'utf-8'?>")
-{
-	if(is_null($xml))
-	{
-		$xml = simplexml_load_string("$doctype<$root/>");
-	}
-
-	foreach((array) $object as $k => $v)
-	{
-		if(is_int($k))
-		{
-			$k = $unknown;
-		}
-
-		if(is_scalar($v))
-		{
-			$xml->addChild($k, h($v));
-		}
-		else
-		{
-			$v = (array) $v;
-			$node = array_diff_key($v, array_keys(array_keys($v))) ? $xml->addChild($k) : $xml;
-			self::from($v, $k, $node);
-		}
-	}
-
-	return $xml;
-}
-
-
-/**
- * Return an IntlDateFormatter object using the current system locale
- *
- * @param string $locale string
- * @param integer $datetype IntlDateFormatter constant
- * @param integer $timetype IntlDateFormatter constant
- * @param string $timezone Time zone ID, default is system default
- * @return IntlDateFormatter
- */
-function __date($locale = NULL, $datetype = IntlDateFormatter::MEDIUM, $timetype = IntlDateFormatter::SHORT, $timezone = NULL)
-{
-	return new IntlDateFormatter($locale ?: setlocale(LC_ALL, 0), $datetype, $timetype, $timezone);
-}
-
-
-/**
- * Format the given string using the current system locale
- * Basically, it's sprintf on i18n steroids.
- *
- * @param string $string to parse
- * @param array $params to insert
- * @return string
- */
-function __($string, array $params = NULL)
-{
-	return msgfmt_format_message(setlocale(LC_ALL, 0), $string, $params);
-}
-
-
-/**
- * Color output text for the CLI
- *
- * @param string $text to color
- * @param string $color of text
- * @param string $background color
- */
-function colorize($text, $color, $bold = FALSE)
-{
-	// Standard CLI colors
-	$colors = array_flip(array(30 => 'gray', 'red', 'green', 'yellow', 'blue', 'purple', 'cyan', 'white', 'black'));
-
-	// Escape string with color information
-	return"\033[" . ($bold ? '1' : '0') . ';' . $colors[$color] . "m$text\033[0m";
-}
-
-// End

+ 0 - 73
frameworks/PHP/micromvc/Config/Config.php

@@ -1,73 +0,0 @@
-<?php
-/**
- * Config
- *
- * Core system configuration file
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2010 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-
-// Base site url - Not currently supported!
-$config['site_url'] = '/';
-
-// Enable debug mode?
-$config['debug_mode'] = FALSE;
-
-// Load boostrap file?
-$config['bootstrap'] = TRUE;
-
-// Available translations (Array of Locales)
-$config['languages'] = array('en');
-
-/**
- * Database
- *
- * This system uses PDO to connect to MySQL, SQLite, or PostgreSQL.
- * Visit http://us3.php.net/manual/en/pdo.drivers.php for more info.
- */
-$config['database'] = array(
-	'dns' => "mysql:host=localhost;port=3306;dbname=hello_world",
-	'username' => 'benchmarkdbuser',
-	'password' => 'benchmarkdbpass',
-	'params' => array()
-);
-
-
-/**
- * System Events
- */
-$config['events'] = array(
-	//'pre_controller'	=> 'Class::method',
-	//'post_controller'	=> 'Class::method',
-);
-
-/**
- * Cookie Handling
- *
- * To insure your cookies are secure, please choose a long, random key!
- * @link http://php.net/setcookie
- */
-$config['cookie'] = array(
-	'key' => 'very-secret-key',
-	'timeout' => time()+(60*60*4), // Ignore submitted cookies older than 4 hours
-	'expires' => 0, // Expire on browser close
-	'path' => '/',
-	'domain' => '',
-	'secure' => '',
-	'httponly' => '',
-);
-
-
-/**
- * API Keys and Secrets
- *
- * Insert you API keys and other secrets here.
- * Use for Akismet, ReCaptcha, Facebook, and more!
- */
-
-//$config['XXX_api_key'] = '...';
-

+ 0 - 36
frameworks/PHP/micromvc/Config/Route.php

@@ -1,36 +0,0 @@
-<?php
-/**
- * URL Routing
- *
- * URLs are very important to the future usability of your site. Take
- * time to think about your structure in a way that is meaningful. Place
- * your most common page routes at the top for better performace.
- *
- * - Routes are matched from left-to-right.
- * - Regex can also be used to define routes if enclosed in "/.../"
- * - Each regex catch pattern (...) will be viewed as a parameter.
- * - The remaning (unmached) URL path will be passed as parameters.
- *
- ** Simple Example **
- * URL Path:	/forum/topic/view/45/Hello-World
- * Route:		"forum/topic/view" => 'Forum\Controller\Forum\View'
- * Result:		Forum\Controller\Forum\View->action('45', 'Hello-World');
- *
- ** Regex Example **
- * URL Path:	/John_Doe4/recent/comments/3
- * Route:		"/^(\w+)/recent/comments/' => 'Comments\Controller\Recent'
- * Result:		Comments\Controller\Recent->action($username = 'John_Doe4', $page = 3)
- */
-$config = array();
-
-$config['routes'] = array(
-	''					=> '\Controller\Index',
-	'404'				=> '\Controller\Page404',
-	'school'			=> '\Controller\School',
-    'json'			    => '\Controller\Benchmark\Json',
-    'db'			    => '\Controller\Benchmark\Db',
-
-	// Example paths
-	//'example/path'		=> '\Controller\Example\Hander',
-	//'example/([^/]+)'	=> '\Controller\Example\Param',
-);

+ 0 - 29
frameworks/PHP/micromvc/Config/Sample.Migration.php

@@ -1,29 +0,0 @@
-<?php
-
-/* Example Column Options:
-$column = array(
-	'type' => 'primary|string|integer|boolean|decimal|datetime',
-	'length' => NULL,
-	'index' => FALSE,
-	'null' => TRUE,
-	'default' => NULL,
-	'unique' => FALSE,
-	'precision' => 0, // (optional, default 0) The precision for a decimal (exact numeric) column. (Applies only if a decimal column is used.)
-	'scale' => 0, // (optional, default 0) The scale for a decimal (exact numeric) column. (Applies only if a decimal column is used.)
-);
-*/
-
-$config = array(
-
-	'test_table' => array(
-		'id' => array('type' => 'primary'),
-		'title' => array('type' => 'string', 'length' => 100),
-		'text' => array('type' => 'string'),
-		'created' => array('type' => 'datetime'),
-		'modified' => array('type' => 'datetime'),
-	),
-
-
-
-
-);

+ 0 - 0
frameworks/PHP/micromvc/Locale/.gitignore


+ 0 - 51
frameworks/PHP/micromvc/Public/.htaccess

@@ -1,51 +0,0 @@
-##############################
-# MicroMVC Apache2 settings
-##############################
-
-# 1and1.com users might need to un-comment this line
-#AddType x-mapp-php5 .php
-
-# Disable directory browsing
-Options All -Indexes
-
-# Prevent folder listing
-#IndexIgnore *
-
-# Set the default file for indexes
-DirectoryIndex index.php index.html
-
-<IfModule mod_rewrite.c>
-
-	# mod_rewrite rules
-	RewriteEngine on
-
-	# The RewriteBase of the system (change if you are using this sytem in a sub-folder).
-	RewriteBase /
-
-	# If the file/dir does not exist, route everything to index.php
-	RewriteCond %{REQUEST_FILENAME} !-f
-	RewriteCond %{REQUEST_FILENAME} !-d
-	RewriteCond %{REQUEST_URI} !^/(robots\.txt|favicon\.ico)
-	RewriteRule ^(.*)$ index.php/$1 [QSA,L]
-
-	#############################
-	# Prevent Image hotlinking (must be blank refer or this site)
-	#RewriteCond %{HTTP_REFERER} !^$
-	#RewriteCond %{HTTP_REFERER} !^http://(micromvc|othersite) [NC]
-	#RewriteRule .*\.(gif|jpg|png)$ [NC,F]
-
-	#############################
-	# Deny any people (or bots) from the following sites: (to stop spam comments)
-	#RewriteCond %{HTTP_REFERER} nienschanz\.ru [NC,OR]
-	#RewriteCond %{HTTP_REFERER} porn\.com
-	#RewriteRule .* - [F]
-
-	# You can also uncomment this if you know the IP:
-	#Deny from 192.168.1.1
-
-</IfModule>
-
-# Cache static content for one week
-#<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf)$">
-#	#Header set Cache-Control "max-age=604800"
-#</FilesMatch>

+ 0 - 212
frameworks/PHP/micromvc/Public/Admin/CSS/admin.css

@@ -1,212 +0,0 @@
-/* Typography - Choose your font and size (base.css default is 16px) */
-body
-{
-	font-size:80%;
-	line-height:1.5em;
-	font-family:Helvetica,Arial,sans-serif;
-	background: #202020;
-}
-/*IE*/
-html>body{font-size:13px}
-pre,code
-{
-	font-family:"DejaVu Sans Mono","Bitstream Vera Sans Mono",Monaco,"Courier New",monospace;
-}
-
-a img, img { border: none; }
-a {color: #2A90BF;text-decoration: none;}
-
-a:hover {
-color: #BE4925;
-text-decoration: underline;
-text-decoration: none;
-}
-
-
-#main {
-margin: 0 0 0 150px;
-background: #ddd;
-}
-
-#content {
-background: #fff;
-padding: 2em;
-margin: 1em 1em 2em 1em;
-margin: 0;
-}
-
-#sidebar { width: 150px; float: left; }
-
-#sidebar h2 {
-color: #777;
-border: none;
-font-size: 20px;
-line-height: 50px;
-text-align: center;
-}
-
-#sidebar ul {
-margin: 2em 0;
-padding: 0;
-list-style: none;
-}
-
-#sidebar ul li {margin: 0;padding: 0;}
-
-#sidebar ul li a {
-display: block;
-line-height: 2.5em;
-padding: 0 1em;
-border-bottom: 1px solid #333;
-color: #fff;
-font-size: 14px;
-font-weight: bold;
-text-shadow:0 1px 2px #000000;
-}
-
-/*
-#sidebar ul li a.selected,
-#sidebar ul li a:hover {
-background: #ddd;
-color: #000;
-text-shadow:0 1px 2px #eee;
-}
-*/
-
-#sidebar ul li a.selected,
-#sidebar ul li a:hover {
-background: #111;
-text-shadow:0 1px 1px #777;
-}
-
-/* Sub levels */
-#sidebar ul li ul { padding: 0; margin: 0; }
-#sidebar ul li li a { color: #ccc; padding: 0 1em 0 3em; }
-
-
-table thead a { color: #333;white-space:nowrap;}
-table tbody tr:hover {background: #f1f1f1;}
-
-
-/*
- * Header
- */
-#header {
-background: #eee;
-height: 30px;
-line-height: 30px;
-margin: 0;
-border-bottom: 0px solid #ddd;
-}
-
-/*
- * Footer
- */
-
-#footer {
-background: #eee;
-height: 30px;
-line-height: 30px;
-margin: 0;
-border-top: 1px solid #ddd;
-color: #777;
-}
-
-
-/*
- * Horizontal menu UL
- */
-ul.horizontal_menu,
-ul.horizontal_menu li {
-margin: 0;
-padding: 0;
-list-style: none;
-}
-ul.horizontal_menu li { float: left; padding: 0 1em; }
-ul.horizontal_menu li.right {float: right;}
-
-
-.box {
-	padding: 1em;
-	margin: 1em 0;
-	background: #eee;
-
-	border: 1px solid #fff;
-	-moz-box-shadow: 0px 1px 4px #bbb;
-	-webkit-box-shadow: 0px 1px 4px #bbb;
-  	box-shadow: 0px 1px 4px #bbb;
-
-  	background: #F7F7F7; /* old browsers */
-	background: -moz-linear-gradient(top, #F7F7F7 0%, #EAEAEA 100%); /* firefox */
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F7F7F7), color-stop(100%,#EAEAEA)); /* webkit */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F7F7F7', endColorstr='#EAEAEA',GradientType=0 ); /* ie */
-}
-
-
-/* Create New link */
-.create_new { float: right; }
-
-.create_new a.button {
-	border-top: 1px solid #6ee653;
-	background: #57c246;
-	background: -webkit-gradient(linear, left top, left bottom, from(#57c246), to(#0c9427));
-	background: -moz-linear-gradient(top,  #57c246,#0c9427);
-	padding: 7px 15px;
-	-webkit-border-radius: 6px;
-	-moz-border-radius: 6px;
-	border-radius: 6px;
-	-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
-	-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
-	box-shadow: rgba(0,0,0,1) 0 1px 0;
-	text-shadow: rgba(0,0,0,.4) 0 1px 0;
-	color: white;
-	text-decoration: none;
-	vertical-align: middle;
-	font-weight: bold;
-}
-.create_new a.button:hover {
-	background: #57c246;
-	background: -webkit-gradient(linear, left top, left bottom, from(#0c9427), to(#57c246));
-	background: -moz-linear-gradient(top, #0c9427, #57c246);
-	color: #ffffff;
-}
-.create_new a.button:active {
-	border-top-color: #1b435e;
-	background: #264d07;
-}
-
-
-/* Pagination links */
-.pagination a { padding: 5px 10px; border: 1px solid #ddd; background: #f8f8f8; border-radius: 4px; }
-.pagination a.current { color: #aaa; }
-
-
-
-/* Messages Boxes use the great Silk icons from http://famfamfam.com/ */
-.message, .warning, .error, .success
-{
-	margin: 1em auto;
-	display: block;
-	padding: .8em 50px;
-	border: 1px solid #fff;
-}
-.message
-{
-	background: #F8FAFC url(../images/message.png) 20px center no-repeat;
-	border-color: #B5D4FE;
-}
-.warning
-{
-	background: #fff6bf url(../images/warning.png) 20px center no-repeat;
-	border-color: #ffd324;
-}
-.error
-{
-	background: #fde6e9 url(../images/error.png) 20px center no-repeat;
-	border-color: #fb939f;
-}
-.success
-{
-	background: #EBFCE1 url(../images/success.png) 20px center no-repeat;
-	border-color: #B9DAA6;
-}

+ 0 - 90
frameworks/PHP/micromvc/Public/Admin/CSS/base.css

@@ -1,90 +0,0 @@
-/*
-A CSS framework by David Pennington
-Copyright 2011, MIT License
-http://xeoncross.com
-*/
-
-/* Master Reset */
-*{vertical-align:baseline}
-html,body,div,form,fieldset,input,textarea,th,td,h1,h2,h3,h4,h5,h6{margin:0;padding:0}
-article,aside,figure,figcaption,hgroup,footer,header,nav,section,video,object{display:block}
-th,td{text-align:left;vertical-align:top;padding:.5em;border:1px solid}
-table{border-collapse:collapse;border-spacing:0;width:100%}
-abbr,acronym{cursor:help;border-bottom:1px dotted}
-fieldset,img{border:0}
-pre{width:100%;white-space:pre;overflow:auto}
-.reset,.reset *{font-weight:inherit;font-family:inherit;font-style:inherit;font-size:1em;border:0;outline:0;padding:0;margin:0}
-
-/* Form Reset (IE7+) */
-input[type=text],input[type=email],input[type=password],input[type=url],input[type=tel],html>body textarea 
-{
-	width:100%;
-	padding:.5em;
-	margin:0 0 1.5em 0;
-	-webkit-box-sizing:border-box; /* Safari/Chrome, other WebKit */
-	-moz-box-sizing:border-box;    /* Firefox, other Gecko */
-	box-sizing:border-box;         /* Opera/IE 8+ */
-}
-
-/* 12 Column Grid System */
-
-/* 1024px, 1152px, & 1280 screens */
-.grid_1{width:50px}
-.grid_2{width:130px}
-.grid_3{width:210px}
-.grid_4{width:290px}
-.grid_5{width:370px}
-.grid_6{width:450px}
-.grid_7{width:530px}
-.grid_8{width:610px}
-.grid_9{width:690px}
-.grid_10{width:770px}
-.grid_11{width:850px}
-.grid_12{width:930px}
-.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12
-{margin-left:30px;float:left;display:inline;/*overflow:hidden;*/}
-.container{width:930px;margin:0 auto;/*overflow:hidden;*/}
-.container .first, .container .grid_12{margin-left:0;clear:left}
-
-/* +1400px screens */
-@media only screen and (min-width:1400px){
-.grid_1{width:70px}
-.grid_2{width:170px}
-.grid_3{width:270px}
-.grid_4{width:370px}
-.grid_5{width:470px}
-.grid_6{width:570px}
-.grid_7{width:670px}
-.grid_8{width:770px}
-.grid_9{width:870px}
-.grid_10{width:970px}
-.grid_11{width:1070px}
-.grid_12{width:1170px}
-.container{width:1170px}
-}
-
-/* Mobile Devices */
-@media only screen and (max-width:700px){
-.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12
-{width:100%;margin-left:0px}
-.container{width:auto;margin:0 2em}
-}
-
-/* Vertical Rhythm - Auto-ajusting Font/Line-Height Ratio */
-body{font-size:100%;line-height:1.5em;font-family:Georgia,serif;}/*IE*/
-html>body{font-size:1em}
-p{margin:0 0 1.5em 0;padding:0}
-h1,h2,h3,h4{font-weight:normal;line-height:1.5em}
-h1{font-size:4em}
-h2{font-size:3em}
-h3{font-size:1.5em;line-height:2em}
-h4{font-size:1em;font-weight:bold}
-table{margin:1em 0}
-th,td{border:1px solid;padding:.5em}
-blockquote{margin:1.5em;font-style:italic}
-ul,ol,dl{margin:1.5em;padding:0}
-ul ul,ol ol{margin:0 2em}
-pre{margin:1.5em 0;line-height:1.5em}
-input,select{font-family:inherit;font-size:1em;/*line-height:1.5em;height:1.5em;*/}
-textarea{margin:0 0 1.5em 0;height:9em;font-family:inherit;font-size:1em;}
-

+ 0 - 37
frameworks/PHP/micromvc/Public/Admin/CSS/style.css

@@ -1,37 +0,0 @@
-table thead tr
-{
-	border-bottom: 1px solid #fff;
-	-moz-box-shadow: 0px 1px 2px #ddd;
-  	-webkit-box-shadow: 0px 1px 2px #ddd;
- 	box-shadow: 0px 1px 2px #ddd;
-}
-
-table th
-{
-	background: #F7F7F7; /* old browsers */
-	background: -moz-linear-gradient(top, #F7F7F7 0%, #EAEAEA 100%); /* firefox */
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F7F7F7), color-stop(100%,#EAEAEA)); /* webkit */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F7F7F7', endColorstr='#EAEAEA',GradientType=0 ); /* ie */
-}
-
-table tr {  border: 1px solid #eee;}
-table td, table th { border: 0; }
-tr:nth-of-type(odd) { background-color:#f8f8f8; }
-
-table tr.header { border-bottom: 1px solid #ddd; }
-table tr.header td { background: #eee; }
-
-/* Column Sorting Table Headers */
-table th a.sort_by {padding-right: 20px;}
-table th a.down {background: url(../images/bullet_arrow_down.png) right no-repeat;}
-table th a.up {background: url(../images/bullet_arrow_up.png) right no-repeat;}
-
-/* Special Links */
-a.delete, a.edit {margin: 0 .5em;}
-
-/* Form Reset (IE7+) */
-input[type=text],input[type=email],input[type=password],input[type=url],input[type=tel],html>body textarea
-{
-	border: 1px solid;
-	border-color: #888 #bbb #e2e2e2;
-}

BIN
frameworks/PHP/micromvc/Public/Admin/Images/bullet_arrow_down.png


BIN
frameworks/PHP/micromvc/Public/Admin/Images/bullet_arrow_up.png


BIN
frameworks/PHP/micromvc/Public/Admin/Images/error.png


+ 0 - 1
frameworks/PHP/micromvc/Public/Admin/Images/famfamfam.com

@@ -1 +0,0 @@
-Images from: http://famfamfam.com

BIN
frameworks/PHP/micromvc/Public/Admin/Images/message.png


BIN
frameworks/PHP/micromvc/Public/Admin/Images/success.png


BIN
frameworks/PHP/micromvc/Public/Admin/Images/warning.png


+ 0 - 89
frameworks/PHP/micromvc/Public/CSS/base.css

@@ -1,89 +0,0 @@
-/*
-A CSS framework by David Pennington
-Copyright 2011, MIT License
-http://xeoncross.com
-*/
-
-/* Master Reset */
-*{vertical-align:baseline}
-html,body,div,form,fieldset,input,textarea,th,td,h1,h2,h3,h4,h5,h6{margin:0;padding:0}
-article,aside,figure,figcaption,hgroup,footer,header,nav,section,video,object{display:block}
-th,td{text-align:left;vertical-align:top;padding:.5em;border:1px solid}
-table{border-collapse:collapse;border-spacing:0;width:100%}
-abbr,acronym{cursor:help;border-bottom:1px dotted}
-fieldset,img{border:0}
-pre{width:100%;white-space:pre;overflow:auto}
-.reset,.reset *{font-weight:inherit;font-family:inherit;font-style:inherit;font-size:1em;border:0;outline:0;padding:0;margin:0}
-
-/* Form Reset (IE7+) */
-input[type=text],input[type=email],input[type=password],input[type=url],input[type=tel],html>body textarea 
-{
-	width:100%;
-	padding:.5em;
-	-webkit-box-sizing:border-box; /* Safari/Chrome, other WebKit */
-	-moz-box-sizing:border-box;    /* Firefox, other Gecko */
-	box-sizing:border-box;         /* Opera/IE 8+ */
-}
-
-/* 12 Column Grid System */
-
-/* 1024px, 1152px, & 1280 screens */
-.grid_1{width:50px}
-.grid_2{width:130px}
-.grid_3{width:210px}
-.grid_4{width:290px}
-.grid_5{width:370px}
-.grid_6{width:450px}
-.grid_7{width:530px}
-.grid_8{width:610px}
-.grid_9{width:690px}
-.grid_10{width:770px}
-.grid_11{width:850px}
-.grid_12{width:930px}
-.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12
-{margin-left:30px;float:left;display:inline;/*overflow:hidden;*/}
-.container{width:930px;margin:0 auto;/*overflow:hidden;*/}
-.container .first, .container .grid_12{margin-left:0;clear:left}
-
-/* +1400px screens */
-@media only screen and (min-width:1400px){
-.grid_1{width:70px}
-.grid_2{width:170px}
-.grid_3{width:270px}
-.grid_4{width:370px}
-.grid_5{width:470px}
-.grid_6{width:570px}
-.grid_7{width:670px}
-.grid_8{width:770px}
-.grid_9{width:870px}
-.grid_10{width:970px}
-.grid_11{width:1070px}
-.grid_12{width:1170px}
-.container{width:1170px}
-}
-
-/* Mobile Devices */
-@media only screen and (max-width:700px){
-.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12
-{width:100%;margin-left:0px}
-.container{width:auto;margin:0 2em}
-}
-
-/* Vertical Rhythm - Auto-ajusting Font/Line-Height Ratio */
-body{font-size:100%;line-height:1.5em;font-family:Georgia,serif;}/*IE*/
-html>body{font-size:1em}
-p{margin:0 0 1.5em 0;padding:0}
-h1,h2,h3,h4{font-weight:normal;line-height:1.5em}
-h1{font-size:4em}
-h2{font-size:3em}
-h3{font-size:1.5em;line-height:2em}
-h4{font-size:1em;font-weight:bold}
-table{margin:1em 0}
-th,td{border:1px solid;padding:.5em}
-blockquote{margin:1.5em;font-style:italic}
-ul,ol,dl{margin:1.5em;padding:0}
-ul ul,ol ol{margin:0 2em}
-pre{margin:1.5em 0;line-height:1.5em}
-input,select{margin:0 0 1.5em 0;font-family:inherit;font-size:1em;/*line-height:1.5em;height:1.5em;*/}
-textarea{margin:0 0 1.5em 0;height:9em;font-family:inherit;font-size:1em;}
-

+ 0 - 86
frameworks/PHP/micromvc/Public/CSS/style.css

@@ -1,86 +0,0 @@
-/* Typography - Choose your font and size (base.css default is 16px) */
-body
-{
-	font-size:80%;
-	line-height:1.5em;
-	font-family:Helvetica,"Helvetica Neue",Arial,sans-serif;
-} /*IE*/
-html>body{font-size:13px}
-pre,code
-{
-	font-family:"DejaVu Sans Mono","Bitstream Vera Sans Mono",Monaco,"Courier New",monospace;
-}
-
-header, #main, footer { float: left; width: 100%; }
-#main { margin: 2em 0; }
-a { text-decoration: none; color: #4B6E89;font-weight: bold; }
-a:hover { color: #000; }
-
-header { border-bottom: 1px solid #ddd; }
-header h1 { color: #ddd; margin: 0;line-height: 100px; }
-
-nav ul{ list-style: none;margin: 0;padding: 0;}
-nav ul li { float: right;margin: 0 2em 0 0;line-height: 100px; }
-
-#sidebar h3 { margin-bottom: 5px; }
-#sidebar ul { margin: 0; }
-#sidebar ul li {list-style: none;border-bottom: 1px solid #eee;line-height: 2.4em;}
-#sidebar ul li:hover { background: #f8f8f8; }
-
-footer { border-top: 1px solid #ddd; padding: 1em 0;color: #999;font-size: 12px; }
-footer .stats { text-align:right; }
-
-/* Form element label */
-form.formstyle label
-{
-	margin: 0px;
-	display: inline;
-	line-height: 2em;
-	float: left;
-	width: 100%;
-}
-form.formstyle label b { float: left; }
-form.formstyle label span
-{
-	color: #999;
-	display: block;
-	font-size: 12px;
-	float: right;
-	text-align: right;
-}
-form.formstyle .form_error
-{
-	color: #E83D1B;
-	font-weight: bold;
-	margin: -1.5em 0 1.5em 0;
-}
-
-/* Messages Boxes use the great Silk icons from http://famfamfam.com/ */
-.message, .warning, .error, .success
-{
-    margin: 1em auto;
-    display: block;
-    clear: both;
-    padding: .8em 50px;
-	border: 1px solid #fff;
-}
-.message
-{
-    background: #F8FAFC url(../Images/message.png) 20px center no-repeat;
-    border-color: #B5D4FE;
-}
-.warning
-{
-    background: #fff6bf url(../Images/warning.png) 20px center no-repeat;
-    border-color: #ffd324;
-}
-.error
-{
-    background: #fde6e9 url(../Images/error.png) 20px center no-repeat;
-    border-color: #fb939f;
-}
-.success
-{
-    background: #EBFCE1 url(../Images/success.png) 20px center no-repeat;
-    border-color: #B9DAA6;
-}

BIN
frameworks/PHP/micromvc/Public/Images/error.png


+ 0 - 1
frameworks/PHP/micromvc/Public/Images/famfamfam.com.txt

@@ -1 +0,0 @@
-http://famfamfam.com

BIN
frameworks/PHP/micromvc/Public/Images/message.png


BIN
frameworks/PHP/micromvc/Public/Images/success.png


BIN
frameworks/PHP/micromvc/Public/Images/warning.png


+ 0 - 38
frameworks/PHP/micromvc/Public/index.php

@@ -1,38 +0,0 @@
-<?php
-/**
- * Index
- *
- * This file defines the basic processing logic flow for the system
- *
- * @package		MicroMVC
- * @author		David Pennington
- * @copyright	(c) 2011 MicroMVC Framework
- * @license		http://micromvc.com/license
- ********************************** 80 Columns *********************************
- */
-
-// Include bootstrap
-require('../Bootstrap.php');
-
-try
-{
-	// Anything else before we start?
-	event('system.startup');
-
-	// Load controller dispatch passing URL routes
-	$dispatch = new \Micro\Dispatch(config('Route')->routes);
-
-	// Run controller based on URL path and HTTP request method
-	$controller = $dispatch->controller(PATH, getenv('REQUEST_METHOD'));
-
-	// Send the controller response
-	$controller->send();
-
-	// One last chance to do something
-	event('system.shutdown', $controller);
-}
-catch (Exception $e)
-{
-	\Micro\Error::exception($e);
-}
-

+ 0 - 17
frameworks/PHP/micromvc/Public/web.config

@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
- <system.webServer>
-   <rewrite>
-    <rules>
-     <rule name="Rewrite" stopProcessing="true">
-      <match url="." ignoreCase="false" />
-      <conditions>
-       <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
-       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
-      </conditions>
-      <action type="Rewrite" url="index.php?uri=" appendQueryString="true" />
-     </rule> 
-    </rules>
-   </rewrite>
- </system.webServer> 
-</configuration>

+ 0 - 36
frameworks/PHP/micromvc/README.md

@@ -1,36 +0,0 @@
-# Micromvc Benchmarking Test
-
-This is the Micromvc portion of a [benchmarking test suite](../) comparing a variety of web development platforms.
-
-### JSON Encoding Test
-Uses the PHP standard [JSON encoder](http://www.php.net/manual/en/function.json-encode.php).
-
-* [JSON test controller](Class/Controller/Benchmark/Json.php)
-
-
-### Data-Store/Database Mapping Test
-Uses the built-in ORM of micromvc
-
-* [DB test controller](Class/Controller/Benchmark/Db.php)
-
-
-## Infrastructure Software Versions
-The tests were run with:
-
-* [Micromvc 4.0.0](http://www.micromvc.com/)
-* [PHP Version 5.5.17](http://www.php.net/) with FPM and APC
-* [nginx 1.4.0](http://nginx.org/)
-* [MySQL 5.5.29](https://dev.mysql.com/)
-
-## Test URLs
-### JSON Encoding Test
-
-http://localhost/json
-
-### Data-Store/Database Mapping Test
-
-http://localhost/db
-
-### Variable Query Test
-    
-http://localhost/db?queries=2

+ 0 - 13
frameworks/PHP/micromvc/README/install.txt

@@ -1,13 +0,0 @@
---- Installing MicroMVC ---
-
-Rename /Config/Sample.*.php files and edit with your configuration values.
-
-The root web folder is /Public where all the Javascript, Images, and CSS should go.
-
-Sample server configurations are provided for Nginx and Apache2.
-
-A CLI console is provided for using the migrations
-
-$ php CLI create
-
-The code is very well commented, please read it.

+ 0 - 19
frameworks/PHP/micromvc/README/license.txt

@@ -1,19 +0,0 @@
-Copyright (c) 2011 David Pennington <http://micromvc.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.

+ 0 - 51
frameworks/PHP/micromvc/README/sample.htaccess

@@ -1,51 +0,0 @@
-##############################
-# MicroMVC Apache2 settings
-##############################
-
-# 1and1.com users might need to un-comment this line
-#AddType x-mapp-php5 .php
-
-# Disable directory browsing
-Options All -Indexes
-
-# Prevent folder listing
-#IndexIgnore *
-
-# Set the default file for indexes
-DirectoryIndex index.php index.html
-
-<IfModule mod_rewrite.c>
-
-	# mod_rewrite rules
-	RewriteEngine on
-
-	# The RewriteBase of the system (change if you are using this sytem in a sub-folder).
-	RewriteBase /
-
-	# If the file/dir does not exist, route everything to index.php
-	RewriteCond %{REQUEST_FILENAME} !-f
-	RewriteCond %{REQUEST_FILENAME} !-d
-	RewriteCond %{REQUEST_URI} !^/(robots\.txt|favicon\.ico)
-	RewriteRule ^(.*)$ index.php/$1 [QSA,L]
-
-	#############################
-	# Prevent Image hotlinking (must be blank refer or this site)
-	#RewriteCond %{HTTP_REFERER} !^$
-	#RewriteCond %{HTTP_REFERER} !^http://(micromvc|othersite) [NC]
-	#RewriteRule .*\.(gif|jpg|png)$ [NC,F]
-
-	#############################
-	# Deny any people (or bots) from the following sites: (to stop spam comments)
-	#RewriteCond %{HTTP_REFERER} nienschanz\.ru [NC,OR]
-	#RewriteCond %{HTTP_REFERER} porn\.com
-	#RewriteRule .* - [F]
-
-	# You can also uncomment this if you know the IP:
-	#Deny from 192.168.1.1
-
-</IfModule>
-
-# Cache static content for one week
-#<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf)$">
-#	#Header set Cache-Control "max-age=604800"
-#</FilesMatch>

+ 0 - 39
frameworks/PHP/micromvc/README/sample.nginx.conf

@@ -1,39 +0,0 @@
-# Basic server setup for domain "servername.tld"
-server {
-	listen 80;
-	server_name servername.tld;
-	root /home/user/www/$host/Public;
-	index index.html index.php;
-
-	# Directives to send expires headers and turn off 404 error logging.
-	#location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
-	#	expires 24h;
-	#	log_not_found off;
-	#}
-
-	# Route all requests for non-existent files to index.php
-	location / {
-		try_files $uri $uri/ /index.php$is_args$args;
-	}
-
-	# Pass PHP scripts to php-fastcgi listening on port 9000
-	location ~ \.php$ {
-
-		# Zero-day exploit defense.
-		# http://forum.nginx.org/read.php?2,88845,page=3
-		# Won't work properly (404 error) if the file is not stored on
-		# this server,  which is entirely possible with php-fpm/php-fcgi.
-		# Comment the 'try_files' line out if you set up php-fpm/php-fcgi
-		# on another machine.  And then cross your fingers that you won't get hacked.
-		try_files $uri =404;
-
-		include fastcgi_params;
-		fastcgi_pass 127.0.0.1:9000;
-	}
-}
-
-# PHP search for file Exploit:
-# The PHP regex location block fires instead of the try_files block. Therefore we need
-# to add "try_files $uri =404;" to make sure that "/uploads/virusimage.jpg/hello.php"
-# never executes the hidden php code inside virusimage.jpg because it can't find hello.php!
-# The exploit also can be stopped by adding "cgi.fix_pathinfo = 0" in your php.ini file.

+ 0 - 0
frameworks/PHP/micromvc/Storage/Log/empty


+ 0 - 2
frameworks/PHP/micromvc/View/404.php

@@ -1,2 +0,0 @@
-<h1>Page Not Found</h1>
-<p>Sorry, we could not find the page you were looking for.</p>

+ 0 - 2
frameworks/PHP/micromvc/View/Index/Index.php

@@ -1,2 +0,0 @@
-<h1>Welcome to MicroMVC</h1>
-<p>If you can see this then your install must be working! Try clicking on the links above to see some example uses.</p>

+ 0 - 51
frameworks/PHP/micromvc/View/Layout.php

@@ -1,51 +0,0 @@
-<!doctype html>
-<html>
-<head>
-	<meta charset="utf-8"/>
-	<title>MicroMVC</title>
-
-	<!--[if lt IE 9]>
-		<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
-	<![endif]-->
-
-	<link rel="stylesheet" media="all" href="style.css"/>
-
-	<?php
-	//Print all CSS files
-	if( ! empty($css)) foreach($css as $file) print '<link rel="stylesheet" media="all" href="'. $file. '" />';
-
-	//Print all JS files
-	if( ! empty($javascript)) foreach($javascript as $file) print '<script type="text/javascript" src="'. $file. '"></script>';
-
-	//Print any other header data
-	if( ! empty($head_data)) print $head_data;
-	?>
-
-	<meta name="viewport" content="width=device-width, initial-scale=1"/>
-
-</head>
-<body lang="en">
-<?php if( ! empty($sidebar)) { ?>
-
-	<div id="content">
-		<?php print $content; ?>
-	</div>
-
-	<div id="sidebar">
-		<?php print $sidebar; ?>
-	</div>
-
-<?php } else { // Else they want to do the content layout themselves... ?>
-
-	<div id="page">
-		<?php print $content; ?>
-	</div>
-
-<?php } ?>
-
-<?php if(isset($pagination)) print $pagination;?>
-
-<?php if(isset($debug)) print '<div id="debug">'. $debug. '</div>';?>
-
-</body>
-</html>

+ 0 - 4
frameworks/PHP/micromvc/View/School/Index.php

@@ -1,4 +0,0 @@
-The controller demonstrates the example use of <i>belongs_to</i>, <i>has_one</i>, <i>has_many</i>, 
-and <i>has_many_through</i> ORM database record relations. This example also clearly shows the use
-of <b>Index-Only SQL</b> and the possibilities it opens for full object-caching while achieving 
-real-time results. See the actual SQL-queries below.

+ 0 - 6
frameworks/PHP/micromvc/View/Sidebar.php

@@ -1,6 +0,0 @@
-<h3>What is this?</h3>
-<p>Well, most people call it a "sidebar" and place information about
-authors or sites here. Lately a lot of people have been using it for
-twitter updates or flickr feeds.</p>
-
-<p>Today is <?php print date('F d, Y'); ?></p>

+ 0 - 71
frameworks/PHP/micromvc/View/System/Debug.php

@@ -1,71 +0,0 @@
-<div style="margin: 60px 0; padding:2em; background:#ECF5FA; color:#000; clear:both;">
-
-<b>Memory Usage</b>
-<pre>
-<?php print number_format(memory_get_usage() - START_MEMORY_USAGE); ?> bytes
-<?php print number_format(memory_get_usage()); ?> bytes (process)
-<?php print number_format(memory_get_peak_usage(TRUE)); ?> bytes (process peak)
-</pre>
-
-<b>Execution Time</b>
-<pre><?php print round((microtime(true) - START_TIME), 5); ?> seconds</pre>
-
-<b>URL Path</b>
-<?php print dump(PATH); ?>
-
-<b>Locale</b>
-<?php print dump(Locale::getDefault()); ?>
-
-<b>Timezone</b>
-<?php print dump(date_default_timezone_get()); ?>
-
-<?php
-if(class_exists('\Micro\Database', FALSE))
-{
-	$highlight = function($string)
-	{
-		return str_replace(array("&lt;?php", "?&gt;"),'',substr(highlight_string('<?php '.$string.' ?>', TRUE),36));
-	};
-
-	foreach(\Micro\Database::$queries as $type => $queries)
-	{
-		print '<b>'.$type.' ('. count($queries). ' queries)</b>';
-		foreach($queries as $data)
-		{
-			print '<pre>'. $highlight(wordwrap($data[1])."\n/* ".round(($data[0]*1000), 2).'ms */'). '</pre>';
-		}
-	}
-
-	if(\Micro\Error::$found)
-	{
-		print '<b>Last Query Run</b>';
-		print '<pre>'. $highlight(\Micro\DataBase::$last_query). '</pre>';
-	}
-}
-?>
-
-<?php if(!empty($_POST)) { ?>
-<b>$_POST Data</b>
-<?php print dump($_POST); ?>
-<?php } ?>
-
-<?php if(!empty($_GET)) { ?>
-<b>$_GET Data</b>
-<?php print dump($_GET); ?>
-<?php } ?>
-
-<?php if(!empty($_SESSION)) { ?>
-<b>Session Data</b>
-<?php print dump($_SESSION); ?>
-<?php } ?>
-
-<?php $included_files = get_included_files(); ?>
-<b><?php print count($included_files); ?> PHP Files Included:</b>
-<pre>
-<?php foreach($included_files as $file) print str_replace(SP, '', $file). "\n"; ?>
-</pre>
-
-<b>Server Info</b>
-<?php print dump($_SERVER); ?>
-
-</div>

+ 0 - 69
frameworks/PHP/micromvc/View/System/Error.php

@@ -1,69 +0,0 @@
-<style type="text/css">
-.system_error {
-	border:1px solid #990000;
-	padding:10px 20px;
-	margin:10px;
-	font: 13px/1.4em verdana;
-	background: #fff;
-}
-code.source {
-	white-space: pre;
-	background: #fff;
-	padding: 1em;
-	display: block;
-	margin: 1em 0;
-	border: 1px solid #bedbeb;
-}
-.system_error .box {
-	margin: 1em 0;
-	background: #ebf2fa;
-	padding: 10px;
-	border: 1px solid #bedbeb;
-}
-.code.source em { background: #ffc; }
-</style>
-
-<div class="system_error">
-
-	<b style="color: #990000">Error</b>
-	<p><?php echo $error; ?></p>
-
-	<?php //print dump(debug_backtrace()); ?>
-
-	<?php
-	if($backtrace = \Micro\Error::backtrace(1))
-	{
-
-		foreach($backtrace as $id => $line)
-		{
-			print '<div class="box">';
-
-			//Skip the first element
-			if( $id !== 0 )
-			{
-				// If this is a class include the class name
-				print '<b>Called by '. (isset($line['class']) ? $line['class']. $line['type'] : '');
-				print $line['function']. '()</b>';
-			}
-
-			// Print file, line, and source
-			print ' in '. $line['file']. ' ['. $line['line']. ']';
-			print '<code class="source">'. $line['source']. '</code>';
-
-			if(isset($line['args']))
-			{
-				print '<b>Function Arguments</b>';
-				print dump($line['args']);
-			}
-
-			print '</div>';
-		}
-
-	}
-	elseif(isset($file, $line))
-	{
-		print '<p><b>'. $file. '</b> ('. $line. ')</p>';
-	}
-	?>
-
-</div>

+ 0 - 73
frameworks/PHP/micromvc/View/System/Exception.php

@@ -1,73 +0,0 @@
-<style type="text/css">
-.system_error {
-	border:1px solid #990000;
-	padding:10px 20px;
-	margin:10px;
-	font: 13px/1.4em verdana;
-	background: #fff;
-}
-code.source {
-	white-space: pre;
-	background: #fff;
-	padding: 1em;
-	display: block;
-	margin: 1em 0;
-	border: 1px solid #bedbeb;
-}
-.system_error .box {
-	margin: 1em 0;
-	background: #ebf2fa;
-	padding: 10px;
-	border: 1px solid #bedbeb;
-}
-code.source em {background: #ffc;}
-</style>
-
-<div class="system_error">
-
-	<b style="color: #990000"><?php echo get_class($exception); ?></b>
-	<p><?php echo $exception->getMessage(); ?></p>
-
-
-	<?php
-	$x = FALSE;
-	if($backtrace = $exception->getTrace())
-	{
-		foreach($backtrace as $id => $line)
-		{
-			if(!isset($line['file'],$line['line']))continue;
-
-			$x = TRUE;
-
-			print '<div class="box">';
-
-			//Skip the first element
-			if( $id !== 0 )
-			{
-				// If this is a class include the class name
-				print '<b>Called by '. (isset($line['class']) ? $line['class']. $line['type'] : '');
-				print $line['function']. '()</b>';
-			}
-
-			// Print file, line, and source
-			print ' in '. $line['file']. ' ['. $line['line']. ']';
-			print '<code class="source">'. \Micro\Error::source($line['file'], $line['line']). '</code>';
-
-			if(isset($line['args']))
-			{
-				print '<b>Function Arguments</b>';
-				print dump($line['args']);
-			}
-
-			print '</div>';
-		}
-
-	}
-
-	if(!$x)
-	{
-		print '<p><b>'.$exception->getFile().'</b> ('.$exception->getLine().')</p>';
-	}
-	?>
-
-</div>

+ 0 - 25
frameworks/PHP/micromvc/benchmark_config.json

@@ -1,25 +0,0 @@
-{
-  "framework": "micromvc",
-  "tests": [{
-    "default": {
-      "setup_file": "setup",
-      "json_url": "/json",
-      "db_url": "/db",
-      "query_url": "/db?queries=",
-      "port": 8080,
-      "approach": "Realistic",
-      "classification": "Micro",
-      "database": "MySQL",
-      "framework": "micromvc",
-      "language": "PHP5",
-      "orm": "Raw",
-      "platform": "PHP5-FPM",
-      "webserver": "nginx",
-      "os": "Linux",
-      "database_os": "Linux",
-      "display_name": "micromvc",
-      "notes": "",
-      "versus": "php5"
-    }
-  }]
-}

+ 0 - 29
frameworks/PHP/micromvc/composer.json

@@ -1,29 +0,0 @@
-{
-	"name": "micromvc/micromvc",
-	"type": "library",
-	"description": "The worlds smallest, full featured, object-oriented PHP 5 Framework",
-	"keywords": ["microframework", "micro", "mvc"],
-	"homepage": "http://micromvc.com",
-	"license": "MIT",
-	"authors": [
-		{
-			"name": "David Pennington",
-			"homepage": "http://xeoncross.com"
-		}
-	],
-	"require": {
-		"php": ">=5.3.0",
-		"micro/micro": "dev-master"
-	},
-	"repositories": [
-		{
-			"type": "vcs",
-			"url": "https://github.com/Xeoncross/Micro.git"
-		}
-	],
-	"autoload": {
-		"psr-0": {
-			"": "Class"
-		}
-	}
-}

+ 0 - 131
frameworks/PHP/micromvc/deploy/nginx.conf

@@ -1,131 +0,0 @@
-#user  nobody;
-worker_processes  8;
-
-#error_log  logs/error.log;
-#error_log  logs/error.log  notice;
-#error_log  logs/error.log  info;
-error_log stderr error;
-
-#pid        logs/nginx.pid;
-
-
-events {
-    worker_connections  1024;
-}
-
-
-http {
-    include       /usr/local/nginx/conf/mime.types;
-    default_type  application/octet-stream;
-
-    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
-    #                  '$status $body_bytes_sent "$http_referer" '
-    #                  '"$http_user_agent" "$http_x_forwarded_for"';
-
-    #access_log  logs/access.log  main;
-    access_log off;
-
-    sendfile        on;
-    #tcp_nopush     on;
-
-    #keepalive_timeout  0;
-    keepalive_timeout  65;
-
-    #gzip  on;
-
-    upstream fastcgi_backend {
-        server 127.0.0.1:9001;
-    }
-
-    server {
-        listen       8080;
-        server_name  localhost;
-
-        #charset koi8-r;
-
-        #access_log  logs/host.access.log  main;
-
-        #location / {
-        #    root   html;
-        #    index  index.html index.htm;
-        #}
-
-        #error_page  404              /404.html;
-
-        # redirect server error pages to the static page /50x.html
-        #
-        #error_page   500 502 503 504  /50x.html;
-        #location = /50x.html {
-        #    root   html;
-        #}
-
-        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
-        #
-        #location ~ \.php$ {
-        #    proxy_pass   http://127.0.0.1;
-        #}
-
-        root /home/ubuntu/FrameworkBenchmarks/php-micromvc/Public/;
-        index  index.php;
-
-        location / {
-            try_files $uri $uri/ /index.php?$uri&$args;
-        }
-
-        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
-        #
-        location ~ \.php$ {
-            try_files $uri =404;
-            fastcgi_pass   fastcgi_backend;
-            fastcgi_index  index.php;
-#            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
-            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
-            include        /usr/local/nginx/conf/fastcgi_params;
-        }
-
-        # deny access to .htaccess files, if Apache's document root
-        # concurs with nginx's one
-        #
-        #location ~ /\.ht {
-        #    deny  all;
-        #}
-    }
-
-
-    # another virtual host using mix of IP-, name-, and port-based configuration
-    #
-    #server {
-    #    listen       8000;
-    #    listen       somename:8080;
-    #    server_name  somename  alias  another.alias;
-
-    #    location / {
-    #        root   html;
-    #        index  index.html index.htm;
-    #    }
-    #}
-
-
-    # HTTPS server
-    #
-    #server {
-    #    listen       443;
-    #    server_name  localhost;
-
-    #    ssl                  on;
-    #    ssl_certificate      cert.pem;
-    #    ssl_certificate_key  cert.key;
-
-    #    ssl_session_timeout  5m;
-
-    #    ssl_protocols  SSLv2 SSLv3 TLSv1;
-    #    ssl_ciphers  HIGH:!aNULL:!MD5;
-    #    ssl_prefer_server_ciphers   on;
-
-    #    location / {
-    #        root   html;
-    #        index  index.html index.htm;
-    #    }
-    #}
-
-}

+ 0 - 9
frameworks/PHP/micromvc/deploy/php-micromvc

@@ -1,9 +0,0 @@
-<VirtualHost *:8080>
-  Alias /php-micromvc/ "/home/ubuntu/FrameworkBenchmarks/php-micromvc/public/"
-  <Directory /home/ubuntu/FrameworkBenchmarks/php-micromvc/public/>
-          Options Indexes FollowSymLinks MultiViews
-          #AllowOverride None
-          Order allow,deny
-          allow from all
-  </Directory>
-</VirtualHost>

+ 0 - 10
frameworks/PHP/micromvc/setup.sh

@@ -1,10 +0,0 @@
-#!/bin/bash
-
-fw_depends php5 nginx
-
-sed -i 's|localhost|'"${DBHOST}"'|g' Config/Config.php
-sed -i 's|root .*/FrameworkBenchmarks/php-micromvc|root '"${TROOT}"'|g' deploy/nginx.conf
-sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
-
-php-fpm --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
-nginx -c $TROOT/deploy/nginx.conf

+ 0 - 61
frameworks/PHP/micromvc/source_code

@@ -1,61 +0,0 @@
-./php-micromvc/Class/
-./php-micromvc/Class/Model
-./php-micromvc/Class/Model/Dorm.php
-./php-micromvc/Class/Model/Car.php
-./php-micromvc/Class/Model/Club.php
-./php-micromvc/Class/Model/Membership.php
-./php-micromvc/Class/Model/Student.php
-./php-micromvc/Class/Model/Benchmark
-./php-micromvc/Class/Model/Benchmark/World.php
-./php-micromvc/Class/MyController.php
-./php-micromvc/Class/Controller
-./php-micromvc/Class/Controller/Page404.php
-./php-micromvc/Class/Controller/School.php
-./php-micromvc/Class/Controller/Index.php
-./php-micromvc/Class/Controller/Benchmark
-./php-micromvc/Class/Controller/Benchmark/Json.php
-./php-micromvc/Class/Controller/Benchmark/Db.php
-./php-micromvc/Command/
-./php-micromvc/Command/Run.php
-./php-micromvc/Command/Create.php
-./php-micromvc/Command/Backup.php
-./php-micromvc/Command/Restore.php
-./php-micromvc/deploy/php-micromvc
-./php-micromvc/Public/
-./php-micromvc/Public/CSS
-./php-micromvc/Public/CSS/base.css
-./php-micromvc/Public/CSS/style.css
-./php-micromvc/Public/.htaccess
-./php-micromvc/Public/Admin
-./php-micromvc/Public/Admin/CSS
-./php-micromvc/Public/Admin/CSS/admin.css
-./php-micromvc/Public/Admin/CSS/base.css
-./php-micromvc/Public/Admin/CSS/style.css
-./php-micromvc/Public/Admin/Images
-./php-micromvc/Public/Admin/Images/error.png
-./php-micromvc/Public/Admin/Images/message.png
-./php-micromvc/Public/Admin/Images/success.png
-./php-micromvc/Public/Admin/Images/bullet_arrow_up.png
-./php-micromvc/Public/Admin/Images/famfamfam.com
-./php-micromvc/Public/Admin/Images/warning.png
-./php-micromvc/Public/Admin/Images/bullet_arrow_down.png
-./php-micromvc/Public/web.config
-./php-micromvc/Public/Images
-./php-micromvc/Public/Images/error.png
-./php-micromvc/Public/Images/message.png
-./php-micromvc/Public/Images/famfamfam.com.txt
-./php-micromvc/Public/Images/success.png
-./php-micromvc/Public/Images/warning.png
-./php-micromvc/Public/index.php
-./php-micromvc/View/
-./php-micromvc/View/Index
-./php-micromvc/View/Index/Index.php
-./php-micromvc/View/Layout.php
-./php-micromvc/View/School
-./php-micromvc/View/School/Index.php
-./php-micromvc/View/System
-./php-micromvc/View/System/Error.php
-./php-micromvc/View/System/Debug.php
-./php-micromvc/View/System/Exception.php
-./php-micromvc/View/Sidebar.php
-./php-micromvc/View/404.php

+ 0 - 7
frameworks/PHP/micromvc/vendor/autoload.php

@@ -1,7 +0,0 @@
-<?php
-
-// autoload.php generated by Composer
-
-require_once __DIR__ . '/composer' . '/autoload_real.php';
-
-return ComposerAutoloaderInit5db07dae5ad758d6b1d4d6028e8b851a::getLoader();

+ 0 - 240
frameworks/PHP/micromvc/vendor/composer/ClassLoader.php

@@ -1,240 +0,0 @@
-<?php
-
-/*
- * This file is part of Composer.
- *
- * (c) Nils Adermann <[email protected]>
- *     Jordi Boggiano <[email protected]>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Composer\Autoload;
-
-/**
- * ClassLoader implements a PSR-0 class loader
- *
- * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
- *
- *     $loader = new \Composer\Autoload\ClassLoader();
- *
- *     // register classes with namespaces
- *     $loader->add('Symfony\Component', __DIR__.'/component');
- *     $loader->add('Symfony',           __DIR__.'/framework');
- *
- *     // activate the autoloader
- *     $loader->register();
- *
- *     // to enable searching the include path (eg. for PEAR packages)
- *     $loader->setUseIncludePath(true);
- *
- * In this example, if you try to use a class in the Symfony\Component
- * namespace or one of its children (Symfony\Component\Console for instance),
- * the autoloader will first look for the class under the component/
- * directory, and it will then fallback to the framework/ directory if not
- * found before giving up.
- *
- * This class is loosely based on the Symfony UniversalClassLoader.
- *
- * @author Fabien Potencier <[email protected]>
- * @author Jordi Boggiano <[email protected]>
- */
-class ClassLoader
-{
-    private $prefixes = array();
-    private $fallbackDirs = array();
-    private $useIncludePath = false;
-    private $classMap = array();
-
-    public function getPrefixes()
-    {
-        return $this->prefixes;
-    }
-
-    public function getFallbackDirs()
-    {
-        return $this->fallbackDirs;
-    }
-
-    public function getClassMap()
-    {
-        return $this->classMap;
-    }
-
-    /**
-     * @param array $classMap Class to filename map
-     */
-    public function addClassMap(array $classMap)
-    {
-        if ($this->classMap) {
-            $this->classMap = array_merge($this->classMap, $classMap);
-        } else {
-            $this->classMap = $classMap;
-        }
-    }
-
-    /**
-     * Registers a set of classes, merging with any others previously set.
-     *
-     * @param string       $prefix  The classes prefix
-     * @param array|string $paths   The location(s) of the classes
-     * @param bool         $prepend Prepend the location(s)
-     */
-    public function add($prefix, $paths, $prepend = false)
-    {
-        if (!$prefix) {
-            if ($prepend) {
-                $this->fallbackDirs = array_merge(
-                    (array) $paths,
-                    $this->fallbackDirs
-                );
-            } else {
-                $this->fallbackDirs = array_merge(
-                    $this->fallbackDirs,
-                    (array) $paths
-                );
-            }
-
-            return;
-        }
-        if (!isset($this->prefixes[$prefix])) {
-            $this->prefixes[$prefix] = (array) $paths;
-
-            return;
-        }
-        if ($prepend) {
-            $this->prefixes[$prefix] = array_merge(
-                (array) $paths,
-                $this->prefixes[$prefix]
-            );
-        } else {
-            $this->prefixes[$prefix] = array_merge(
-                $this->prefixes[$prefix],
-                (array) $paths
-            );
-        }
-    }
-
-    /**
-     * Registers a set of classes, replacing any others previously set.
-     *
-     * @param string       $prefix  The classes prefix
-     * @param array|string $paths   The location(s) of the classes
-     */
-    public function set($prefix, $paths)
-    {
-        if (!$prefix) {
-            $this->fallbackDirs = (array) $paths;
-
-            return;
-        }
-        $this->prefixes[$prefix] = (array) $paths;
-    }
-
-    /**
-     * Turns on searching the include path for class files.
-     *
-     * @param bool $useIncludePath
-     */
-    public function setUseIncludePath($useIncludePath)
-    {
-        $this->useIncludePath = $useIncludePath;
-    }
-
-    /**
-     * Can be used to check if the autoloader uses the include path to check
-     * for classes.
-     *
-     * @return bool
-     */
-    public function getUseIncludePath()
-    {
-        return $this->useIncludePath;
-    }
-
-    /**
-     * Registers this instance as an autoloader.
-     *
-     * @param bool $prepend Whether to prepend the autoloader or not
-     */
-    public function register($prepend = false)
-    {
-        spl_autoload_register(array($this, 'loadClass'), true, $prepend);
-    }
-
-    /**
-     * Unregisters this instance as an autoloader.
-     */
-    public function unregister()
-    {
-        spl_autoload_unregister(array($this, 'loadClass'));
-    }
-
-    /**
-     * Loads the given class or interface.
-     *
-     * @param  string    $class The name of the class
-     * @return bool|null True if loaded, null otherwise
-     */
-    public function loadClass($class)
-    {
-        if ($file = $this->findFile($class)) {
-            include $file;
-
-            return true;
-        }
-    }
-
-    /**
-     * Finds the path to the file where the class is defined.
-     *
-     * @param string $class The name of the class
-     *
-     * @return string|false The path if found, false otherwise
-     */
-    public function findFile($class)
-    {
-        if ('\\' == $class[0]) {
-            $class = substr($class, 1);
-        }
-
-        if (isset($this->classMap[$class])) {
-            return $this->classMap[$class];
-        }
-
-        if (false !== $pos = strrpos($class, '\\')) {
-            // namespaced class name
-            $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)) . DIRECTORY_SEPARATOR;
-            $className = substr($class, $pos + 1);
-        } else {
-            // PEAR-like class name
-            $classPath = null;
-            $className = $class;
-        }
-
-        $classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
-
-        foreach ($this->prefixes as $prefix => $dirs) {
-            if (0 === strpos($class, $prefix)) {
-                foreach ($dirs as $dir) {
-                    if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
-                        return $dir . DIRECTORY_SEPARATOR . $classPath;
-                    }
-                }
-            }
-        }
-
-        foreach ($this->fallbackDirs as $dir) {
-            if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
-                return $dir . DIRECTORY_SEPARATOR . $classPath;
-            }
-        }
-
-        if ($this->useIncludePath && $file = stream_resolve_include_path($classPath)) {
-            return $file;
-        }
-
-        return $this->classMap[$class] = false;
-    }
-}

+ 0 - 9
frameworks/PHP/micromvc/vendor/composer/autoload_classmap.php

@@ -1,9 +0,0 @@
-<?php
-
-// autoload_classmap.php generated by Composer
-
-$vendorDir = dirname(dirname(__FILE__));
-$baseDir = dirname($vendorDir);
-
-return array(
-);

+ 0 - 11
frameworks/PHP/micromvc/vendor/composer/autoload_namespaces.php

@@ -1,11 +0,0 @@
-<?php
-
-// autoload_namespaces.php generated by Composer
-
-$vendorDir = dirname(dirname(__FILE__));
-$baseDir = dirname($vendorDir);
-
-return array(
-    'Micro' => $vendorDir . '/micro/micro',
-    '' => $baseDir . '/Class',
-);

+ 0 - 43
frameworks/PHP/micromvc/vendor/composer/autoload_real.php

@@ -1,43 +0,0 @@
-<?php
-
-// autoload_real.php generated by Composer
-
-class ComposerAutoloaderInit5db07dae5ad758d6b1d4d6028e8b851a
-{
-    private static $loader;
-
-    public static function loadClassLoader($class)
-    {
-        if ('Composer\Autoload\ClassLoader' === $class) {
-            require __DIR__ . '/ClassLoader.php';
-        }
-    }
-
-    public static function getLoader()
-    {
-        if (null !== self::$loader) {
-            return self::$loader;
-        }
-
-        spl_autoload_register(array('ComposerAutoloaderInit5db07dae5ad758d6b1d4d6028e8b851a', 'loadClassLoader'), true, true);
-        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInit5db07dae5ad758d6b1d4d6028e8b851a', 'loadClassLoader'));
-
-        $vendorDir = dirname(__DIR__);
-        $baseDir = dirname($vendorDir);
-
-        $map = require __DIR__ . '/autoload_namespaces.php';
-        foreach ($map as $namespace => $path) {
-            $loader->add($namespace, $path);
-        }
-
-        $classMap = require __DIR__ . '/autoload_classmap.php';
-        if ($classMap) {
-            $loader->addClassMap($classMap);
-        }
-
-        $loader->register(true);
-
-        return $loader;
-    }
-}

Some files were not shown because too many files changed in this diff