Browse Source

Merge pull request #2007 from cjnething/issue-1694-files-created-edited-during-benchmarks-add-to-gitignore-jn-2

Resolves #1694: Gitignore files created during benchmarking
Mike Smith 9 years ago
parent
commit
eeb06d11d3
100 changed files with 67 additions and 4927 deletions
  1. 2 0
      frameworks/C++/cpoll_cppsp/.gitignore
  2. 1 0
      frameworks/C++/ffead-cpp/.gitignore
  3. 1 0
      frameworks/C++/poco/.gitignore
  4. 1 0
      frameworks/C++/silicon/.gitignore
  5. 2 0
      frameworks/C++/wt/.gitignore
  6. 3 1
      frameworks/C/duda/.gitignore
  7. 2 0
      frameworks/C/onion/.gitignore
  8. 1 0
      frameworks/D/vibed/.gitignore
  9. 1 0
      frameworks/Dart/start/.gitignore
  10. 1 0
      frameworks/Dart/stream/.gitignore
  11. 1 0
      frameworks/Erlang/chicagoboss/.gitignore
  12. 1 0
      frameworks/Erlang/misultin/.gitignore
  13. 1 0
      frameworks/Erlang/mochiweb/.gitignore
  14. 2 0
      frameworks/Go/beego/.gitignore
  15. 2 0
      frameworks/Go/echo/.gitignore
  16. 2 0
      frameworks/Go/falcore/.gitignore
  17. 2 0
      frameworks/Go/fasthttp-mysql/.gitignore
  18. 2 0
      frameworks/Go/fasthttp-postgresql/.gitignore
  19. 2 0
      frameworks/Go/gin/.gitignore
  20. 2 0
      frameworks/Go/go-std-mongodb/.gitignore
  21. 2 0
      frameworks/Go/go-std-mysql/.gitignore
  22. 1 0
      frameworks/Go/revel-qbs/.gitignore
  23. 1 0
      frameworks/Go/revel/.gitignore
  24. 3 0
      frameworks/Go/webgo/.gitignore
  25. 2 0
      frameworks/Haskell/snap/.gitignore
  26. 2 0
      frameworks/Haskell/wai/.gitignore
  27. 2 0
      frameworks/Haskell/yesod/.gitignore
  28. 1 0
      frameworks/Java/beyondj/.gitignore
  29. 1 0
      frameworks/Java/grizzly-jersey/.gitignore
  30. 2 0
      frameworks/Java/play1/.gitignore
  31. 1 0
      frameworks/Java/undertow-jersey-c3p0/.gitignore
  32. 1 0
      frameworks/Java/undertow-jersey-hikaricp/.gitignore
  33. 2 1
      frameworks/PHP/clancats/.gitignore
  34. 3 4
      frameworks/PHP/cygnite-php-framework/.gitignore
  35. 1 0
      frameworks/PHP/fat-free/.gitignore
  36. 2 0
      frameworks/PHP/hhvm/.gitignore
  37. 1 0
      frameworks/PHP/lithium/.gitignore
  38. 0 0
      frameworks/PHP/lithium/app/resources/g11n/empty
  39. 0 0
      frameworks/PHP/lithium/app/resources/tmp/cache/templates/empty
  40. 0 31
      frameworks/PHP/lithium/app/resources/tmp/cache/templates/template_views_layouts_default.html_0_1365705000_831.php
  41. 0 257
      frameworks/PHP/lithium/app/resources/tmp/cache/templates/template_views_pages_home.html_0_1365705000_8876.php
  42. 0 0
      frameworks/PHP/lithium/app/resources/tmp/logs/empty
  43. 0 0
      frameworks/PHP/lithium/app/resources/tmp/tests/empty
  44. 1 0
      frameworks/PHP/micromvc/.gitignore
  45. 2 0
      frameworks/PHP/phalcon-micro/.gitignore
  46. 0 0
      frameworks/PHP/phalcon-micro/compiled-templates/.keepit
  47. 0 1
      frameworks/PHP/phalcon-micro/compiled-templates/_home_tfb_frameworkbenchmarks_php-phalcon-micro_views_bench_fortunes.volt.c
  48. 0 1
      frameworks/PHP/phalcon-micro/compiled-templates/_home_tfb_frameworkbenchmarks_php-phalcon-micro_views_layouts_bench.volt.c
  49. 2 0
      frameworks/PHP/phalcon/.gitignore
  50. 0 0
      frameworks/PHP/phalcon/app/compiled-templates/.keepit
  51. 0 1
      frameworks/PHP/phalcon/app/compiled-templates/_home_tfb_frameworkbenchmarks_php-phalcon_app_views_bench_fortunes.volt.compiled
  52. 0 1
      frameworks/PHP/phalcon/app/compiled-templates/_home_tfb_frameworkbenchmarks_php-phalcon_app_views_layouts_bench.volt.compiled
  53. 2 0
      frameworks/PHP/phpixie/.gitignore
  54. 0 7
      frameworks/PHP/phpixie/vendor/autoload.php
  55. 0 246
      frameworks/PHP/phpixie/vendor/composer/ClassLoader.php
  56. 0 36
      frameworks/PHP/phpixie/vendor/composer/autoload_classmap.php
  57. 0 10
      frameworks/PHP/phpixie/vendor/composer/autoload_namespaces.php
  58. 0 43
      frameworks/PHP/phpixie/vendor/composer/autoload_real.php
  59. 0 150
      frameworks/PHP/phpixie/vendor/composer/installed.json
  60. 0 4
      frameworks/PHP/phpixie/vendor/phpixie/core/README.md
  61. 0 126
      frameworks/PHP/phpixie/vendor/phpixie/core/assets/views/debug.php
  62. 0 166
      frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Config.php
  63. 0 111
      frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Controller.php
  64. 0 106
      frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Debug.php
  65. 0 9
      frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Exception/PageNotFound.php
  66. 0 281
      frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Pixie.php
  67. 0 200
      frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Request.php
  68. 0 71
      frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Response.php
  69. 0 98
      frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Route.php
  70. 0 132
      frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Router.php
  71. 0 119
      frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Session.php
  72. 0 106
      frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/View.php
  73. 0 26
      frameworks/PHP/phpixie/vendor/phpixie/core/composer.json
  74. 0 10
      frameworks/PHP/phpixie/vendor/phpixie/core/tests/bootstrap.php
  75. 0 108
      frameworks/PHP/phpixie/vendor/phpixie/core/tests/configTest.php
  76. 0 58
      frameworks/PHP/phpixie/vendor/phpixie/core/tests/controllerTest.php
  77. 0 1
      frameworks/PHP/phpixie/vendor/phpixie/core/tests/phpunit.xml
  78. 0 105
      frameworks/PHP/phpixie/vendor/phpixie/core/tests/pixieTest.php
  79. 0 158
      frameworks/PHP/phpixie/vendor/phpixie/core/tests/requestTest.php
  80. 0 66
      frameworks/PHP/phpixie/vendor/phpixie/core/tests/responseTest.php
  81. 0 43
      frameworks/PHP/phpixie/vendor/phpixie/core/tests/routeTest.php
  82. 0 132
      frameworks/PHP/phpixie/vendor/phpixie/core/tests/routerTest.php
  83. 0 91
      frameworks/PHP/phpixie/vendor/phpixie/core/tests/sessionTest.php
  84. 0 54
      frameworks/PHP/phpixie/vendor/phpixie/core/tests/viewTest.php
  85. 0 4
      frameworks/PHP/phpixie/vendor/phpixie/db/README.md
  86. 0 129
      frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB.php
  87. 0 92
      frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Connection.php
  88. 0 35
      frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Expression.php
  89. 0 123
      frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Mysql/Connection.php
  90. 0 12
      frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Mysql/Query.php
  91. 0 57
      frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Mysql/Result.php
  92. 0 132
      frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/PDO/Connection.php
  93. 0 396
      frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/PDO/Query.php
  94. 0 57
      frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/PDO/Result.php
  95. 0 448
      frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Query.php
  96. 0 113
      frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Result.php
  97. 0 26
      frameworks/PHP/phpixie/vendor/phpixie/db/composer.json
  98. 0 10
      frameworks/PHP/phpixie/vendor/phpixie/db/tests/bootstrap.php
  99. 0 81
      frameworks/PHP/phpixie/vendor/phpixie/db/tests/db/dbTest.php
  100. 0 41
      frameworks/PHP/phpixie/vendor/phpixie/db/tests/db/expressionTest.php

+ 2 - 0
frameworks/C++/cpoll_cppsp/.gitignore

@@ -0,0 +1,2 @@
+/www/*.so
+/www/*.txt

+ 1 - 0
frameworks/C++/ffead-cpp/.gitignore

@@ -0,0 +1 @@
+/ffead-cpp-2.0/

+ 1 - 0
frameworks/C++/poco/.gitignore

@@ -0,0 +1 @@
+/poco

+ 1 - 0
frameworks/C++/silicon/.gitignore

@@ -0,0 +1 @@
+/build/

+ 2 - 0
frameworks/C++/wt/.gitignore

@@ -0,0 +1,2 @@
+/benchmark.wt
+/benchmark_postgres.wt

+ 3 - 1
frameworks/C/duda/.gitignore

@@ -1,3 +1,5 @@
 *.o
 *~
-
+/Makefile
+/main.d
+/ws.duda

+ 2 - 0
frameworks/C/onion/.gitignore

@@ -0,0 +1,2 @@
+/assets.h
+/onion

+ 1 - 0
frameworks/D/vibed/.gitignore

@@ -5,3 +5,4 @@ __dummy.html
 *.obj
 *.dll
 *.exe
+/fwb

+ 1 - 0
frameworks/Dart/start/.gitignore

@@ -1 +1,2 @@
 packages/*
+/nginx.conf

+ 1 - 0
frameworks/Dart/stream/.gitignore

@@ -1 +1,2 @@
 packages/*
+/nginx.conf

+ 1 - 0
frameworks/Erlang/chicagoboss/.gitignore

@@ -2,3 +2,4 @@ erl_crash.dump
 deps
 ebin
 .rebar
+/log/

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

@@ -5,3 +5,4 @@ ebin
 *.beam
 *.plt
 erl_crash.dump
+/.rebar/

+ 1 - 0
frameworks/Erlang/mochiweb/.gitignore

@@ -5,3 +5,4 @@ ebin
 *.beam
 *.plt
 erl_crash.dump
+/.rebar/

+ 2 - 0
frameworks/Go/beego/.gitignore

@@ -0,0 +1,2 @@
+/src/github.com/
+/pkg/linux_amd64/

+ 2 - 0
frameworks/Go/echo/.gitignore

@@ -0,0 +1,2 @@
+/pkg/
+/src/

+ 2 - 0
frameworks/Go/falcore/.gitignore

@@ -0,0 +1,2 @@
+/pkg/linux_amd64/
+/src/github.com/

+ 2 - 0
frameworks/Go/fasthttp-mysql/.gitignore

@@ -0,0 +1,2 @@
+/pkg/
+/src/github.com/

+ 2 - 0
frameworks/Go/fasthttp-postgresql/.gitignore

@@ -0,0 +1,2 @@
+/pkg/
+/src/github.com/

+ 2 - 0
frameworks/Go/gin/.gitignore

@@ -0,0 +1,2 @@
+/pkg/
+/src/

+ 2 - 0
frameworks/Go/go-std-mongodb/.gitignore

@@ -0,0 +1,2 @@
+/pkg/
+/src/gopkg.in/

+ 2 - 0
frameworks/Go/go-std-mysql/.gitignore

@@ -0,0 +1,2 @@
+/pkg/
+/src/github.com/

+ 1 - 0
frameworks/Go/revel-qbs/.gitignore

@@ -0,0 +1 @@
+/src/github.com/

+ 1 - 0
frameworks/Go/revel/.gitignore

@@ -0,0 +1 @@
+/src/github.com/

+ 3 - 0
frameworks/Go/webgo/.gitignore

@@ -0,0 +1,3 @@
+/pkg/linux_amd64/
+/src/github.com/
+/src/golang.org/

+ 2 - 0
frameworks/Haskell/snap/.gitignore

@@ -1 +1,3 @@
 dist/
+/bench/.cabal-sandbox/
+/bench/cabal.sandbox.config

+ 2 - 0
frameworks/Haskell/wai/.gitignore

@@ -1,2 +1,4 @@
 bench/cabal-dev
 bench/dist
+/bench/.cabal-sandbox/
+/bench/cabal.sandbox.config

+ 2 - 0
frameworks/Haskell/yesod/.gitignore

@@ -1 +1,3 @@
 bench/cabal-dev
+/bench/.cabal-sandbox/
+/bench/cabal.sandbox.config

+ 1 - 0
frameworks/Java/beyondj/.gitignore

@@ -0,0 +1 @@
+beyondj-launcher/deploy

+ 1 - 0
frameworks/Java/grizzly-jersey/.gitignore

@@ -0,0 +1 @@
+/dependency-reduced-pom.xml

+ 2 - 0
frameworks/Java/play1/.gitignore

@@ -1 +1,3 @@
 precompiled/*
+/server.pid
+/tmp/

+ 1 - 0
frameworks/Java/undertow-jersey-c3p0/.gitignore

@@ -0,0 +1 @@
+/dependency-reduced-pom.xml

+ 1 - 0
frameworks/Java/undertow-jersey-hikaricp/.gitignore

@@ -0,0 +1 @@
+/dependency-reduced-pom.xml

+ 2 - 1
frameworks/PHP/clancats/.gitignore

@@ -9,4 +9,5 @@ composer.lock
 phpunit.xml
 phpunit.phar
 report/
-run
+run
+/clancatsapp/

+ 3 - 4
frameworks/PHP/cygnite-php-framework/.gitignore

@@ -1,5 +1,3 @@
-
-
 #Build System
 **/builds/*
 
@@ -58,6 +56,7 @@ intermediate
 publish
 .idea
 
-
 #Arcanist
-.arcconfig
+.arcconfig
+
+/deploy/php-fpm.pid

+ 1 - 0
frameworks/PHP/fat-free/.gitignore

@@ -0,0 +1 @@
+/deploy/php-fpm.pid

+ 2 - 0
frameworks/PHP/hhvm/.gitignore

@@ -0,0 +1,2 @@
+/.hhvm.bbhc
+/hhvm.pid

+ 1 - 0
frameworks/PHP/lithium/.gitignore

@@ -9,3 +9,4 @@
 .idea
 vendor
 deploy/php-fpm.pid
+/app/resources/

+ 0 - 0
frameworks/PHP/lithium/app/resources/g11n/empty


+ 0 - 0
frameworks/PHP/lithium/app/resources/tmp/cache/templates/empty


+ 0 - 31
frameworks/PHP/lithium/app/resources/tmp/cache/templates/template_views_layouts_default.html_0_1365705000_831.php

@@ -1,31 +0,0 @@
-<?php
-/**
- * Lithium: the most rad php framework
- *
- * @copyright     Copyright 2013, Union of RAD (http://union-of-rad.org)
- * @license       http://opensource.org/licenses/bsd-license.php The BSD License
- */
-?>
-<!doctype html>
-<html>
-<head>
-	<?php echo $this->html->charset();?>
-	<title>Application &gt; <?php echo $this->title(); ?></title>
-	<?php echo $this->html->style(array('debug', 'lithium')); ?>
-	<?php echo $this->scripts(); ?>
-	<?php echo $this->html->link('Icon', null, array('type' => 'icon')); ?>
-</head>
-<body class="app">
-	<div id="container">
-		<div id="header">
-			<h1>Application</h1>
-			<h2>
-				Powered by <?php echo $this->html->link('Lithium', 'http://lithify.me/'); ?>.
-			</h2>
-		</div>
-		<div id="content">
-			<?php echo $this->content(); ?>
-		</div>
-	</div>
-</body>
-</html>

+ 0 - 257
frameworks/PHP/lithium/app/resources/tmp/cache/templates/template_views_pages_home.html_0_1365705000_8876.php

@@ -1,257 +0,0 @@
-<?php
-/**
- * Lithium: the most rad php framework
- *
- * @copyright     Copyright 2013, Union of RAD (http://union-of-rad.org)
- * @license       http://opensource.org/licenses/bsd-license.php The BSD License
- */
-
-use lithium\core\Libraries;
-use lithium\core\Environment;
-use lithium\data\Connections;
-
-$this->title('Home');
-
-$self = $this;
-
-$notify = function($status, $message, $solution = null) {
-	$html  = "<div class=\"test-result test-result-{$status}\">{$message}</div>";
-	$html .= "<div class=\"test-result solution\">{$solution}</div>";
-	return $html;
-};
-
-$support = function($classes) {
-	$result = '<ul class="indicated">';
-
-	foreach ($classes as $class => $enabled) {
-		$name = substr($class, strrpos($class, '\\') + 1);
-		$url = 'http://lithify.me/docs/' . str_replace('\\', '/', $class);
-		$class = $enabled ? 'enabled' : 'disabled';
-		$title = $enabled ? "Adapter `{$name}` is enabled." : "Adapter `{$name}` is disabled.";
-
-		$result .= "<li><a href=\"{$url}\" title=\"{$title}\" class=\"{$class}\">{$name}</a></li>";
-	}
-	$result .= '</ul>';
-
-	return $result;
-};
-
-$compiled = function($flag) {
-	ob_start();
-	phpinfo(INFO_GENERAL);
-	return strpos(ob_get_clean(), $flag) !== false;
-};
-
-$checks = array(
-	'resourcesWritable' => function() use ($notify) {
-		if (is_writable($path = Libraries::get(true, 'resources'))) {
-			return $notify('success', 'Resources directory is writable');
-		}
-		$path = str_replace(dirname(LITHIUM_APP_PATH) . '/', null, $path);
-		$solution = null;
-
-		if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
-			$solution  = 'To fix this, run the following from the command line: ';
-			$solution .= "<code>$ chmod -R 0777 {$path}</code>.";
-		} else {
-			$path = realpath($path);
-			$solution  = 'To fix this, give <code>modify</code> rights to the user ';
-			$solution .= "<code>Everyone</code> on directory <code>{$path}</code>.";
-		}
-		return $notify(
-			'fail',
-			'Your resource path is not writeable',
-			$solution
-		);
-	},
-	'magicQuotes' => function() use ($notify) {
-		if (!get_magic_quotes_gpc()) {
-			return;
-		}
-		return $notify(
-			'fail',
-			'Magic quotes are enabled in your PHP configuration',
-			'Please set <code>magic_quotes_gpc = Off</code> in your <code>php.ini</code> settings.'
-		);
-	},
-	'registerGlobals' => function() use ($notify) {
-		if (!ini_get('register_globals')) {
-			return;
-		}
-		return $notify(
-			'fail',
-			'Register globals is enabled in your PHP configuration',
-			'Please set <code>register_globals = Off</code> in your <code>php.ini</code> settings.'
-		);
-	},
-	'curlwrappers' => function() use ($notify, $compiled) {
-		if (!$compiled('with-curlwrappers')) {
-			return;
-		}
-		return $notify(
-			'fail',
-			'Curlwrappers are enabled, some things might not work as expected.',
-			"This is an expiremental and usually broken feature of PHP.
-			Please recompile your PHP binary without using the <code>--with-curlwrappers</code>
-			flag or use a precompiled binary that was compiled without the flag."
-		);
-	},
-	'shortOpenTag' => function() use ($notify, $compiled) {
-		if (!ini_get('short_open_tag')) {
-			return;
-		}
-		return $notify(
-			'notice',
-			'Short open tags are enabled, you may want to disable them.',
-			"It is recommended to not rely on this option being enabled.
-			To increase the portability of your code disable this option by setting
-			<code>short_open_tag = Off</code> in your <code>php.ini</code>."
-		);
-	},
-	'dbSupport' => function() use ($notify, $support) {
-		$paths = array('data.source', 'adapter.data.source.database', 'adapter.data.source.http');
-		$list = array();
-
-		foreach ($paths as $path) {
-			$list = array_merge($list, Libraries::locate($path, null, array('recursive' => false)));
-		}
-		$list = array_filter($list, function($class) { return method_exists($class, 'enabled'); });
-		$map = array_combine($list, array_map(function($c) { return $c::enabled(); }, $list));
-
-		return $notify('notice', 'Database support', $support($map));
-	},
-	'cacheSupport' => function() use ($notify, $support) {
-		$list = Libraries::locate('adapter.storage.cache', null, array('recursive' => false));
-		$list = array_filter($list, function($class) { return method_exists($class, 'enabled'); });
-		$map = array_combine($list, array_map(function($c) { return $c::enabled(); }, $list));
-
-		return $notify('notice', 'Cache support', $support($map));
-	},
-	'database' => function() use ($notify) {
-		if ($config = Connections::config()) {
-			return $notify('success', 'Database connection(s) configured');
-		}
-		return $notify(
-			'notice',
-			'No database connection defined',
-			"To create a database connection:
-			<ol>
-				<li>Edit the file <code>config/bootstrap.php</code>.</li>
-				<li>
-					Uncomment the line having
-					<code>require __DIR__ . '/bootstrap/connections.php';</code>.
-				</li>
-				<li>Edit the file <code>config/bootstrap/connections.php</code>.</li>
-			</ol>"
-		);
-	},
-	'change' => function() use ($notify, $self) {
-		$template = $self->html->link('template', 'http://lithify.me/docs/lithium/template');
-
-		return $notify(
-			'notice',
-			"You're using the application's default home page",
-			"To change this {$template}, edit the file
-			<code>views/pages/home.html.php</code>.
-			To change the layout,
-			(that is what's wrapping content)
-			edit the file <code>views/layouts/default.html.php</code>."
-		);
-	},
-	'routing' => function() use ($notify, $self) {
-		$routing = $self->html->link('routing', 'http://lithify.me/docs/lithium/net/http/Router');
-
-		return $notify(
-			'notice',
-			'Use custom routing',
-			"Routes allow you to map custom URLs to your application code. To change the
-			{$routing}, edit the file <code>config/routes.php</code>."
-		);
-	},
-	'tests' => function() use ($notify, $self) {
-		if (Environment::is('production')) {
-			$docsLink = $self->html->link(
-				'the documentation',
-				'http://lithify.me/docs/lithium/core/Environment::is()'
-			);
-
-			return $notify(
-				'fail',
-				"Can't run tests",
-				"<p>Lithium's default environment detection rules have determined that you are
-				running in production mode. Therefore, you will not be able to run tests from the
-				web interface. You can do any of the following to remedy this:</p>
-				<ul>
-					<li>Run this application locally</li>
-					<li>Run tests from the console, using the <code>li3 test</code> command</li>
-					<li>
-						Implementing custom environment detection rules;
-						see {$docsLink} for examples
-					</li>
-				</ul>"
-			);
-		}
-		$tests = $self->html->link('run all tests', array(
-			'controller' => 'lithium\test\Controller',
-			'args' => 'all'
-		));
-		$dashboard = $self->html->link('test dashboard', array(
-			'controller' => 'lithium\test\Controller'
-		));
-		$ticket = $self->html->link(
-			'file a ticket', 'https://github.com/UnionOfRAD/lithium/issues'
-		);
-
-		return $notify(
-			'notice',
-			'Run the tests',
-			"Check the builtin {$dashboard} or {$tests} now to ensure Lithium
-			is working as expected. Do not hesitate to {$ticket} in case a test fails."
-		);
-	}
-);
-
-?>
-
-<?php foreach ($checks as $check): ?>
-	<?php echo $check(); ?>
-<?php endforeach; ?>
-
-<ul class="additional-resources">
-	<li>
-		<div class="test-result test-result-notice">Getting started</div>
-		<div class="test-result solution">
-			<?php echo $this->html->link(
-				'Quickstart', 'http://lithify.me/docs/manual/quickstart'
-			); ?> is a guide for PHP users who are looking to get a good idea of what Lithium can
-			do. The guide is part of the official Lithium manual, <?php echo $this->html->link(
-				'The Definitive Guide', 'http://lithify.me/docs/manual'
-			); ?>.
-		</div>
-	</li>
-	<li>
-		<div class="test-result test-result-notice">Learn more</div>
-		<div class="test-result solution">
-			The
-			<?php echo $this->html->link('API documentation', 'http://lithify.me/docs/lithium'); ?>
-			has all the implementation details you've been looking for.
-		</div>
-	</li>
-	<li>
-		Chat with other Lithium users and the team developing Lithium.
-		For <em>general support</em> hop on the
-		<?php echo $this->html->link('#li3 channel', 'irc://irc.freenode.net/#li3'); ?>
-		or read the
-		<?php echo $this->html->link('logs', 'http://lithify.me/bot/logs/li3'); ?>.
-		For <em>core discussions</em> join us in the
-		<?php echo $this->html->link('#li3-core channel', 'irc://irc.freenode.net/#li3-core'); ?>
-		or read the
-		<?php echo $this->html->link('logs', 'http://lithify.me/bot/logs/li3-core'); ?>.
-	</li>
-	<li>
-		Browse the Lithium
-		<?php echo $this->html->link('Repository', 'https://github.com/UnionOfRAD/lithium'); ?>
-		or read the
-		<?php echo $this->html->link('Wiki', 'https://github.com/UnionOfRAD/lithium/wiki'); ?>.
-	</li>
-</ul>

+ 0 - 0
frameworks/PHP/lithium/app/resources/tmp/logs/empty


+ 0 - 0
frameworks/PHP/lithium/app/resources/tmp/tests/empty


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

@@ -7,3 +7,4 @@
 .DS_Store
 /tags
 .idea
+/deploy/php-fpm.pid

+ 2 - 0
frameworks/PHP/phalcon-micro/.gitignore

@@ -0,0 +1,2 @@
+/compiled-templates/
+/deploy/php-fpm.pid

+ 0 - 0
frameworks/PHP/phalcon-micro/compiled-templates/.keepit


+ 0 - 1
frameworks/PHP/phalcon-micro/compiled-templates/_home_tfb_frameworkbenchmarks_php-phalcon-micro_views_bench_fortunes.volt.c

@@ -1 +0,0 @@
-<table><tr><th>id</th><th>message</th></tr><?php foreach ($fortunes as $fortune) { ?><tr><td><?php echo $fortune['id']; ?></td><td><?php echo $this->escaper->escapeHtml($fortune['message']); ?></td></tr><?php } ?></table>

+ 0 - 1
frameworks/PHP/phalcon-micro/compiled-templates/_home_tfb_frameworkbenchmarks_php-phalcon-micro_views_layouts_bench.volt.c

@@ -1 +0,0 @@
-<!DOCTYPE html><html><head><title>Fortunes</title></head><body><?php echo $this->getContent(); ?></body></html>

+ 2 - 0
frameworks/PHP/phalcon/.gitignore

@@ -1,5 +1,6 @@
 /app/cache
 /app/logs
+/app/compiled-templates/
 /bin
 /vendors
 /build
@@ -7,3 +8,4 @@
 .DS_Store
 /tags
 .idea
+/deploy/php-fpm.pid

+ 0 - 0
frameworks/PHP/phalcon/app/compiled-templates/.keepit


+ 0 - 1
frameworks/PHP/phalcon/app/compiled-templates/_home_tfb_frameworkbenchmarks_php-phalcon_app_views_bench_fortunes.volt.compiled

@@ -1 +0,0 @@
-<table><tr><th>id</th><th>message</th></tr><?php foreach ($fortunes as $fortune) { ?><tr><td><?php echo $fortune['id']; ?></td><td><?php echo $this->escaper->escapeHtml($fortune['message']); ?></td></tr><?php } ?></table>

+ 0 - 1
frameworks/PHP/phalcon/app/compiled-templates/_home_tfb_frameworkbenchmarks_php-phalcon_app_views_layouts_bench.volt.compiled

@@ -1 +0,0 @@
-<!DOCTYPE html><html><head><title>Fortunes</title></head><body><?php echo $this->getContent(); ?></body></html>

+ 2 - 0
frameworks/PHP/phpixie/.gitignore

@@ -0,0 +1,2 @@
+/deploy/php-fpm.pid
+/vendor/

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

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

+ 0 - 246
frameworks/PHP/phpixie/vendor/composer/ClassLoader.php

@@ -1,246 +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 call_user_func_array('array_merge', $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;
-        }
-
-        $first = $prefix[0];
-        if (!isset($this->prefixes[$first][$prefix])) {
-            $this->prefixes[$first][$prefix] = (array) $paths;
-
-            return;
-        }
-        if ($prepend) {
-            $this->prefixes[$first][$prefix] = array_merge(
-                (array) $paths,
-                $this->prefixes[$first][$prefix]
-            );
-        } else {
-            $this->prefixes[$first][$prefix] = array_merge(
-                $this->prefixes[$first][$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[substr($prefix, 0, 1)][$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)
-    {
-        // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
-        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 = strtr(substr($class, 0, $pos), '\\', DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
-            $className = substr($class, $pos + 1);
-        } else {
-            // PEAR-like class name
-            $classPath = null;
-            $className = $class;
-        }
-
-        $classPath .= strtr($className, '_', DIRECTORY_SEPARATOR) . '.php';
-
-        $first = $class[0];
-        if (isset($this->prefixes[$first])) {
-            foreach ($this->prefixes[$first] 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 - 36
frameworks/PHP/phpixie/vendor/composer/autoload_classmap.php

@@ -1,36 +0,0 @@
-<?php
-
-// autoload_classmap.php @generated by Composer
-
-$vendorDir = dirname(dirname(__FILE__));
-$baseDir = dirname($vendorDir);
-
-return array(
-    'PHPixie\\Config' => $vendorDir . '/phpixie/core/classes/PHPixie/Config.php',
-    'PHPixie\\Controller' => $vendorDir . '/phpixie/core/classes/PHPixie/Controller.php',
-    'PHPixie\\DB' => $vendorDir . '/phpixie/db/classes/PHPixie/DB.php',
-    'PHPixie\\DB\\Connection' => $vendorDir . '/phpixie/db/classes/PHPixie/DB/Connection.php',
-    'PHPixie\\DB\\Expression' => $vendorDir . '/phpixie/db/classes/PHPixie/DB/Expression.php',
-    'PHPixie\\DB\\Mysql\\Connection' => $vendorDir . '/phpixie/db/classes/PHPixie/DB/Mysql/Connection.php',
-    'PHPixie\\DB\\Mysql\\Query' => $vendorDir . '/phpixie/db/classes/PHPixie/DB/Mysql/Query.php',
-    'PHPixie\\DB\\Mysql\\Result' => $vendorDir . '/phpixie/db/classes/PHPixie/DB/Mysql/Result.php',
-    'PHPixie\\DB\\PDO\\Connection' => $vendorDir . '/phpixie/db/classes/PHPixie/DB/PDO/Connection.php',
-    'PHPixie\\DB\\PDO\\Query' => $vendorDir . '/phpixie/db/classes/PHPixie/DB/PDO/Query.php',
-    'PHPixie\\DB\\PDO\\Result' => $vendorDir . '/phpixie/db/classes/PHPixie/DB/PDO/Result.php',
-    'PHPixie\\DB\\Query' => $vendorDir . '/phpixie/db/classes/PHPixie/DB/Query.php',
-    'PHPixie\\DB\\Result' => $vendorDir . '/phpixie/db/classes/PHPixie/DB/Result.php',
-    'PHPixie\\Debug' => $vendorDir . '/phpixie/core/classes/PHPixie/Debug.php',
-    'PHPixie\\Exception\\PageNotFound' => $vendorDir . '/phpixie/core/classes/PHPixie/Exception/PageNotFound.php',
-    'PHPixie\\ORM' => $vendorDir . '/phpixie/orm/classes/PHPixie/ORM.php',
-    'PHPixie\\ORM\\Extension' => $vendorDir . '/phpixie/orm/classes/PHPixie/ORM/Extension.php',
-    'PHPixie\\ORM\\Extension\\Nested' => $vendorDir . '/phpixie/orm/classes/PHPixie/ORM/Extension/Nested.php',
-    'PHPixie\\ORM\\Model' => $vendorDir . '/phpixie/orm/classes/PHPixie/ORM/Model.php',
-    'PHPixie\\ORM\\Result' => $vendorDir . '/phpixie/orm/classes/PHPixie/ORM/Result.php',
-    'PHPixie\\Pixie' => $vendorDir . '/phpixie/core/classes/PHPixie/Pixie.php',
-    'PHPixie\\Request' => $vendorDir . '/phpixie/core/classes/PHPixie/Request.php',
-    'PHPixie\\Response' => $vendorDir . '/phpixie/core/classes/PHPixie/Response.php',
-    'PHPixie\\Route' => $vendorDir . '/phpixie/core/classes/PHPixie/Route.php',
-    'PHPixie\\Router' => $vendorDir . '/phpixie/core/classes/PHPixie/Router.php',
-    'PHPixie\\Session' => $vendorDir . '/phpixie/core/classes/PHPixie/Session.php',
-    'PHPixie\\View' => $vendorDir . '/phpixie/core/classes/PHPixie/View.php',
-);

+ 0 - 10
frameworks/PHP/phpixie/vendor/composer/autoload_namespaces.php

@@ -1,10 +0,0 @@
-<?php
-
-// autoload_namespaces.php @generated by Composer
-
-$vendorDir = dirname(dirname(__FILE__));
-$baseDir = dirname($vendorDir);
-
-return array(
-    'PHPixie' => array($vendorDir . '/phpixie/core/classes', $vendorDir . '/phpixie/db/classes', $vendorDir . '/phpixie/orm/classes'),
-);

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

@@ -1,43 +0,0 @@
-<?php
-
-// autoload_real.php @generated by Composer
-
-class ComposerAutoloaderInitf7f56072c6b4cbd174b02f65e83ee57a
-{
-    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('ComposerAutoloaderInitf7f56072c6b4cbd174b02f65e83ee57a', 'loadClassLoader'), true, true);
-        self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInitf7f56072c6b4cbd174b02f65e83ee57a', 'loadClassLoader'));
-
-        $vendorDir = dirname(__DIR__);
-        $baseDir = dirname($vendorDir);
-
-        $map = require __DIR__ . '/autoload_namespaces.php';
-        foreach ($map as $namespace => $path) {
-            $loader->set($namespace, $path);
-        }
-
-        $classMap = require __DIR__ . '/autoload_classmap.php';
-        if ($classMap) {
-            $loader->addClassMap($classMap);
-        }
-
-        $loader->register(true);
-
-        return $loader;
-    }
-}

+ 0 - 150
frameworks/PHP/phpixie/vendor/composer/installed.json

@@ -1,150 +0,0 @@
-[
-    {
-        "name": "phpixie/core",
-        "version": "dev-master",
-        "version_normalized": "9999999-dev",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/dracony/PHPixie-Core.git",
-            "reference": "11092a22456ecb30f488fc246def5a16ffa47abf"
-        },
-        "dist": {
-            "type": "zip",
-            "url": "https://api.github.com/repos/dracony/PHPixie-Core/zipball/11092a22456ecb30f488fc246def5a16ffa47abf",
-            "reference": "11092a22456ecb30f488fc246def5a16ffa47abf",
-            "shasum": ""
-        },
-        "require": {
-            "php": ">=5.3.0"
-        },
-        "time": "2013-07-17 12:57:49",
-        "type": "library",
-        "extra": {
-            "branch-alias": {
-                "dev-master": "2.*-dev"
-            }
-        },
-        "installation-source": "dist",
-        "autoload": {
-            "psr-0": {
-                "PHPixie": "classes/"
-            }
-        },
-        "notification-url": "https://packagist.org/downloads/",
-        "license": [
-            "BSD"
-        ],
-        "authors": [
-            {
-                "name": "Roman Tsiupa",
-                "email": "[email protected]",
-                "homepage": "http://dracony.org"
-            }
-        ],
-        "description": "PHPixie Framework",
-        "homepage": "http://phpixie.com",
-        "keywords": [
-            "framework"
-        ]
-    },
-    {
-        "name": "phpixie/db",
-        "version": "dev-master",
-        "version_normalized": "9999999-dev",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/dracony/PHPixie-DB.git",
-            "reference": "4a3706193b0064a18d5c3115e6f1831c9f14de2e"
-        },
-        "dist": {
-            "type": "zip",
-            "url": "https://api.github.com/repos/dracony/PHPixie-DB/zipball/4a3706193b0064a18d5c3115e6f1831c9f14de2e",
-            "reference": "4a3706193b0064a18d5c3115e6f1831c9f14de2e",
-            "shasum": ""
-        },
-        "require": {
-            "phpixie/core": "2.*@dev"
-        },
-        "time": "2013-06-22 22:25:03",
-        "type": "library",
-        "extra": {
-            "branch-alias": {
-                "dev-master": "2.x-dev"
-            }
-        },
-        "installation-source": "dist",
-        "autoload": {
-            "psr-0": {
-                "PHPixie": "classes/"
-            }
-        },
-        "notification-url": "https://packagist.org/downloads/",
-        "license": [
-            "BSD"
-        ],
-        "authors": [
-            {
-                "name": "Roman Tsiupa",
-                "email": "[email protected]",
-                "homepage": "http://dracony.org"
-            }
-        ],
-        "description": "PHPixie Database library",
-        "homepage": "http://phpixie.com",
-        "keywords": [
-            "database",
-            "mysql",
-            "postgresql",
-            "sqlite"
-        ]
-    },
-    {
-        "name": "phpixie/orm",
-        "version": "dev-master",
-        "version_normalized": "9999999-dev",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/dracony/PHPixie-ORM.git",
-            "reference": "c6c379b9efd17e021a9659f01ed2f75027e3a2fc"
-        },
-        "dist": {
-            "type": "zip",
-            "url": "https://api.github.com/repos/dracony/PHPixie-ORM/zipball/c6c379b9efd17e021a9659f01ed2f75027e3a2fc",
-            "reference": "c6c379b9efd17e021a9659f01ed2f75027e3a2fc",
-            "shasum": ""
-        },
-        "require": {
-            "phpixie/db": "2.*@dev"
-        },
-        "time": "2013-07-15 23:35:57",
-        "type": "library",
-        "extra": {
-            "branch-alias": {
-                "dev-master": "2.x-dev"
-            }
-        },
-        "installation-source": "dist",
-        "autoload": {
-            "psr-0": {
-                "PHPixie": "classes/"
-            }
-        },
-        "notification-url": "https://packagist.org/downloads/",
-        "license": [
-            "BSD"
-        ],
-        "authors": [
-            {
-                "name": "Roman Tsiupa",
-                "email": "[email protected]",
-                "homepage": "http://dracony.org"
-            }
-        ],
-        "description": "ORM library for PHPixie",
-        "homepage": "http://phpixie.com",
-        "keywords": [
-            "database",
-            "orm"
-        ]
-    }
-]

+ 0 - 4
frameworks/PHP/phpixie/vendor/phpixie/core/README.md

@@ -1,4 +0,0 @@
-PHPixie-Core
-============
-
-PHPixie framework core

+ 0 - 126
frameworks/PHP/phpixie/vendor/phpixie/core/assets/views/debug.php

@@ -1,126 +0,0 @@
-<!DOCTYPE html>
-<html>
-	<head>
-		<title>Error</title>
-		<style>
-			html{
-				width:100%;
-				min-height:100%;
-				font-family:'Verdana';
-				font-size:14px;
-			}
-			body{
-
-				min-height:100%;
-				background: #a90329; /* Old browsers */
-				background: -moz-radial-gradient(center, ellipse cover, #a90329 0%, #6d0019 100%); /* FF3.6+ */
-				background: -webkit-radial-gradient(center, ellipse cover, #a90329 0%,#6d0019 100%); /* Chrome10+,Safari5.1+ */
-			}
-			#content{
-				width:1000px;
-				margin:auto;
-				padding:10px 0px;
-				background:#eee;
-			}
-			.file{
-				font-weight:bold;
-			}
-			.block{
-				border-bottom:1px solid #000;
-				margin:10px;
-			}
-			.code{
-				
-				padding:10px;
-			}
-			.highlight{
-				background:#efecd0;
-			}
-			#exception{
-				font-size:25px;
-				font-weight:bold;
-				padding:10px;
-			}
-			#debug{
-				border-bottom: 1px solid black;
-				margin: 10px;
-			}
-			#log{
-				font-size:15px;
-				font-weight:bold;
-				padding:5px;
-			}
-			.log{
-				padding:10px;
-				border-bottom: 1px solid black;
-			}
-			.log.odd{
-				
-			}
-			pre{
-				margin:0px;
-			}
-			.thick{
-				border-width:2px;
-			}
-		</style>
-	</head>
-	<body>
-		<?php 
-			$rawblocks=array_merge(array(array(
-				'file'=>$exception->getFile(),
-				'line'=>$exception->getLine()
-			)), $exception->getTrace());
-			$blocks = array();
-			foreach($rawblocks as $block){
-				if(!isset($block['file']))
-					continue;
-				//avoid duplicates
-				if(count($blocks)>0){
-					$last=$blocks[count($blocks)-1];
-					if($block['file']==$last['file'] && $block['line']==$last['line'])
-						continue;
-				}
-				$blocks[]=$block;
-			}
-			
-			
-		?>
-		<div id="content">
-			<div id="exception"><?php echo str_replace("\n",'<br/>',$exception->getMessage()); ?></div>
-			<div id="blocks">
-				<?php foreach($blocks as $bkey=>$block):	?>
-					<div class="block <?php echo (!empty($log)&&$bkey==0)?'thick':''; ?>">
-						<div class="file"><?php echo $block['file'];?></div>
-						<div class="code">
-							<?php 
-								$line=$block['line']-1;
-								$code = explode("\n", file_get_contents($block['file']));
-								$start = $line - 3;
-								if ($start < 0) $start = 0;
-								$end = $line + 3;
-								if($end>=count($code)) $end=count($code)-1;
-								$code=array_slice($code,$start,$end-$start,true);
-							?>
-							
-							<?php foreach($code as $n=>$text):?>
-							<pre class="line <?php echo $n==$line?'highlight':''; ?>"><?php echo ($n+1).'    '.htmlspecialchars($text); ?></pre>
-							<?php endforeach;?>
-						</div>
-					</div>
-					<?php if($bkey==0&&!empty($log)):?>
-						<div id="debug">
-							<div id="log">Logged values:</div>
-							<?php foreach($log as $key=>$val):?>
-								<div class="log <?php echo $key%2?'odd':''; ?>">
-									<pre><?php var_export($val);?></pre>
-								</div>
-							<?php endforeach;?>
-						</div>
-						<div id="log">Call stack:</div>
-					<?php endif;?>
-				<?php endforeach;?>
-			</div>
-		</div>
-	</body>
-</html>

+ 0 - 166
frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Config.php

@@ -1,166 +0,0 @@
-<?php
-
-namespace PHPixie;
-
-/**
- * Handles retrieving of the configuration options.
- * You can add configuration files to /assets/config folder
- * and later access them via the get() method.
- * @package Core
- */
-class Config
-{
-
-	/**
-	 * Pixie Dependancy Container
-	 * @var \PHPixie\Pixie
-	 */
-	protected $pixie;
-	
-	/**
-	 * Array of configuration files and values loaded from them
-	 * @var array
-	 */
-	protected $groups = array();
-
-	/**
-	 * Constructs a config handler
-	 *
-	 * @param \PHPixie\Pixie $pixie Pixie dependency container
-	 */
-	public function __construct($pixie) {
-		$this->pixie = $pixie;
-	}
-	
-	/**
-	 * Loads a group configuration file it has not been loaded before and
-	 * returns its options. If the group doesn't exist creates an empty one
-	 *
-	 * @param string    $name Name of the configuration group to load
-	 * @return array    Array of options for this group
-	 */
-	public function get_group($name)
-	{
-
-		if (!isset($this->groups[$name]))
-		{
-			$file = $this->pixie->find_file('config', $name);
-			$this->load_group($name, $file);
-		}
-
-		return $this->groups[$name]['options'];
-	}
-
-	/**
-	 * Loads group from file
-	 *
-	 * @param string $name Name to assign the loaded group
-	 * @param string $file File to load
-	 */
-	public function load_group($name, $file)
-	{
-		
-		if(!empty($file)){
-			$options = include($file);
-			if (!is_array($options))
-				$options = array();
-		}else {
-			$options = array();
-			$file = $this->pixie-> root_dir.'assets/config/'.$name.'.php';
-		}
-		
-		$this->groups[$name] = array(
-			'file' => $file,
-			'options' => $options
-		);
-	}
-
-	/**
-	 * Retrieves a configuration value. You can use a dot notation
-	 * to access properties in group arrays. The first part of the key
-	 * specifies the configuration file from which options should be loaded from
-	 * <code>
-	 *     //Loads ['default']['user'] option
-	 *     //from database.php configuration file
-	 *     $this->pixie->config->get('database.default.user');
-	 * </code>
-	 *
-	 * @param string    $key Configuration key to retrieve.
-	 * @param string    $default Default value to return if the key is not found.
-	 * @return mixed    Configuration value
-	 * @throws \Exception If default value is not specified and the key is not found
-	 */
-	public function get()
-	{
-		$p = func_get_args();
-
-		$keys = explode('.', $p[0]);
-		$group_name = array_shift($keys);
-		$group = $this->get_group($group_name);
-		if (empty($keys))
-			return $group;
-
-		$total = count($keys);
-		foreach ($keys as $i => $key)
-		{
-			if (isset($group[$key]))
-			{
-				if ($i == $total - 1)
-					return $group[$key];
-				$group = &$group[$key];
-			}else
-			{
-				if (array_key_exists(1, $p))
-					return $p[1];
-				throw new \Exception("Configuration not set for {$p[0]}.");
-			}
-		}
-	}
-
-	/**
-	 * Sets a configuration option.
-	 *
-	 * @param string    $key    Configuration key to set
-	 * @param string    $value  Value to set for this option
-	 */
-	public function set($key, $value)
-	{
-		$keys = explode('.', $key);
-		$group_name = array_shift($keys);
-		$group = $this->get_group($group_name);
-		$subgroup = &$group;
-		$last_key = count($keys) - 1;
-		foreach ($keys as $i => $key)
-		{
-
-			if ($i == $last_key)
-			{
-
-				$subgroup[$key] = $value;
-			}
-			else
-			{
-
-				if (!isset($subgroup[$key]) || !is_array($subgroup[$key])) 
-					$subgroup[$key] = array();
-				
-				$subgroup = & $subgroup[$key];
-			}
-		}
-
-		$this->groups[$group_name]['options'] = $group;
-	}
-
-	/**
-	 * Writes a configuration group back to the file it was loaded from
-	 *
-	 * @param string    $group    Name of the group to write
-	 */
-	public function write($group)
-	{
-		$this->get_group($group);
-		$group = $this->groups[$group];
-		file_put_contents($group['file'], "<?php\r\nreturn ".var_export($group['options'], true).";");
-	}
-
-}

+ 0 - 111
frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Controller.php

@@ -1,111 +0,0 @@
-<?php
-
-namespace PHPixie;
-
-/**
- * Base Controller class. Controllers contain the  logic of your website,
- * each action representing a reply to a particular request, e.g. a single page.
- * @package Core
- */
-class Controller
-{
-	
-	/**
-	 * Pixie Dependancy Container
-	 * @var \PHPixie\Pixie
-	 */
-	protected $pixie;
-	
-	/**
-	 * Request for this controller. Holds all input data.
-	 * @var \PHPixie\Request
-	 */
-	public $request;
-
-	/**
-	 * Response for this controller. It will be updated with headers and
-	 * response body during controller execution
-	 * @var \PHPixie\Response
-	 */
-	public $response;
-
-	/**
-	 * If set to False stops controller execution
-	 * @var boolean
-	 */
-	public $execute = true;
-
-	/**
-	 * This method is called before the action.
-	 * You can override it if you need to,
-	 * it doesn't do anything by default.
-	 *
-	 * @return void
-	 */
-	public function before()
-	{
-
-	}
-
-	/**
-	 * This method is called after the action.
-	 * You can override it if you need to,
-	 * it doesn't do anything by default.
-	 *
-	 * @return void
-	 */
-	public function after()
-	{
-
-	}
-
-	/**
-	 * Creates new Controller
-	 *
-	 */
-	public function __construct($pixie)
-	{
-		$this->pixie = $pixie;
-		$this->response = new Response;
-	}
-
-	/**
-	 * Shortcut for redirecting the user.
-	 * Use like this:
-	 * <code>
-	 *     return $this->redirect($url);
-	 * </code>
-	 *
-	 * @param string $url URL to redirect to.
-	 * @return void
-	 */
-	public function redirect($url) {
-		$this->response-> redirect($url);
-		$this->execute = false;
-	}
-	
-	/**
-	 * Runs the appropriate action.
-	 * It will execute the before() method before the action
-	 * and after() method after the action finishes.
-	 *
-	 * @param string    $action Name of the action to execute.
-	 * @return void
-	 * @throws \PHPixie\Exception\PageNotFound If the specified action doesn't exist
-	 */
-	public function run($action)
-	{
-		$action = 'action_'.$action;
-		
-		if (!method_exists($this, $action))
-			throw new \PHPixie\Exception\PageNotFound("Method {$action} doesn't exist in ".get_class($this));
-			
-		$this->execute = true;
-		$this->before();
-		if ($this->execute)
-			$this->$action();
-		if ($this->execute)
-			$this->after();
-	}
-
-}

+ 0 - 106
frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Debug.php

@@ -1,106 +0,0 @@
-<?php
-
-namespace PHPixie;
-
-/**
- * Handles error reporting and debugging.
- * @package Core
- */
-class Debug
-{
-
-	/**
-	 * Pixie Dependancy Container
-	 * @var \PHPixie\Pixie
-	 */
-	protected $pixie;
-	
-	/**
-	 * An array of logged items
-	 * @var array
-	 */
-	public $logged = array();
-	
-	/**
-	 * Flag that determines if the errors are displayed
-	 * @var boolean
-	 */
-	public $display_errors = true;
-	
-	/**
-	 * Constructs a debugger
-	 *
-	 * @param \PHPixie\Pixie $pixie Pixie dependency container
-	 */
-	public function __construct($pixie) {
-		$this->pixie = $pixie;
-	}
-	
-	/**
-	 * Displays the error page. If you set $display_errors to false
-	 * only a small error message will be displayed.
-	 *
-	 * @param \Exception $exception Exception to display
-	 * @return void
-	 */
-	public function render_exception_page($exception)
-	{
-		if (ob_get_length() > 0)
-			ob_end_clean();
-
-		$status = '503 Service Temporarily Unavailable';
-		
-		if ($exception instanceof \PHPixie\Exception\PageNotFound)
-			$status = '404 Not Found';
-			
-		header($_SERVER["SERVER_PROTOCOL"].' '.$status);
-		header("Status: {$status}");
-
-		if (!$this->display_errors) {
-			echo $status;
-		}else{
-			$view = $this->pixie->view('debug');
-			$view->exception = $exception;
-			$view->log = $this->logged;
-			echo $view->render();
-		}
-		
-	}
-
-	/**
-	 * Converts PHP Errors to Exceptions
-	 *
-	 * @param string        $errno   Error number
-	 * @param string        $errstr  Error message
-	 * @param string        $errfile File in which the error occurred
-	 * @param string        $errline Line at which the error occurred
-	 * @return void
-	 * @throws \ErrorException Throws converted exception to be immediately caught
-	 */
-	public function error_handler($errno, $errstr, $errfile, $errline)
-	{
-		throw new \ErrorException($errstr, $errno, 0, $errfile, $errline);
-	}
-
-	/**
-	 * Initializes the error handler
-	 *
-	 * @return void
-	 */
-	public function init()
-	{
-		set_error_handler(array($this, 'error_handler'), E_ALL);
-	}
-
-	/**
-	 * Adds an item to the log.
-	 *
-	 * @param mixed $val Item to be logged
-	 * @return void
-	 */
-	public function log($val)
-	{
-		array_unshift($this->logged, $val);
-	}
-
-}

+ 0 - 9
frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Exception/PageNotFound.php

@@ -1,9 +0,0 @@
-<?php
-
-namespace PHPixie\Exception;
-
-/**
- * This exception is throw when none of the routes matched
- * or the specified controller or action wasn't found.
- */
-class PageNotFound extends \Exception {}

+ 0 - 281
frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Pixie.php

@@ -1,281 +0,0 @@
-<?php
-
-namespace PHPixie;
-
-/**
- * The core of the framework and it's dependancy container.
- * It holds references to all framework wide instances, like Config,
- * Session, Debug etc. Instead of calling a class constructor you call 
- * a wrapping function of this class to construct the object for you.
- * You can extend this class adding porperties that you want to be accessible
- * all around your app.
- *
- * @property-read \PHPixie\Config $config Configuration handler
- * @property-read \PHPixie\Debug $debug Error handler and logger
- * @property-read \PHPixie\Router $router Router
- * @property-read \PHPixie\Session $session Session handler
- */
-
- class Pixie {
-	
-  	/**
-	 * Instance definitions
-	 * @var array
-	 */
-	protected $instance_classes = array(
-		'config'  => '\PHPixie\Config',
-		'debug'   => '\PHPixie\Debug',
-		'router'  => '\PHPixie\Router',
-		'session' => '\PHPixie\Session',
-	);
-	
- 	/**
-	 * Instanced classes
-	 * @var array
-	 */
-	protected $instances = array();
-	
-	/**
-	 * Module definitions
-	 * @var array
-	 */
-	protected $modules = array();
-	
- 	/**
-	 * Directories to look for assets in
-	 * @var array
-	 */
-	public $assets_dirs = array();
-	
- 	/**
-	 * Root directory of the application
-	 * @var array
-	 */
-	public $root_dir;
-	
-	/**
-	 * Namespace of the application
-	 * @var array
-	 */
-	public $app_namespace;
-	
-	/**
-	 * Base URL of the application
-	 * @var string
-	 */
-	public $basepath = '/';
-	
-	/**
-	 * Gets a property by name. Returns defined class and module instances
-	 *
-	 * @param string $name Property namw
-	 * @return mixed Instance of defined class or module
-	 */
-	public function __get($name) {
-		if (isset($this->instances[$name]))
-			return $this->instances[$name];
-			
-		if (isset($this->instance_classes[$name]))
-			return $this->instances[$name] = new $this->instance_classes[$name]($this);
-			
-		if (isset($this->modules[$name]))
-			return $this->instances[$name] = new $this->modules[$name]($this);
-			
-		throw new \Exception("Property {$name} not found on ".get_class($this));
-	}		
-
-	/**
-	 * Constructs a controller by class name
-	 *
-	 * @param string $class Controller class
-	 * @return \PHPixie\Controller
-	 * @throw  \PHPixie\Exception\PageNotFound If the controller class is not found
-	 */
-	public function controller($class) {
-		if (!class_exists($class))
-			throw new \PHPixie\Exception\PageNotFound("Class {$class} doesn't exist");
-			
-		return new $class($this);
-	}
-	
-	/**
-	 * Constructs a request
-	 *
-	 * @param  Route  $route  Route for this request
-	 * @param  string $method HTTP method for the request (e.g. GET, POST)
-	 * @param  array  $post   Array of POST data
-	 * @param  array  $get    Array of GET data
-	 * @param  array  $server Array of SERVER data
-	 * @return \PHPixie\Request
-	 */
-	public function request($route, $method = "GET", $post = array(), $get = array(), $param=array(), $server = array()) {
-		return new \PHPixie\Request($this, $route, $method, $post, $get, $param, $server);
-	}
-	
-	/**
-	 * Constructs a response
-	 *
-	 * @return \PHPixie\Response
-	 */
-	public function response() {
-		return new \PHPixie\Response;
-	}
-	
-	/**
-	 * Constructs a route
-	 *
-	 * @param string $name Name of the route
-	 * @param mixed $rule Rule for this route
-	 * @param array $defaults Default parameters for the route
-	 * @param mixed $methods Methods to restrict this route to.
-	 *                       Either a single method or an array of them.
-	 * @return \PHPixie\Route
-	 */
-	public function route($name, $rule, $defaults, $methods = null) {
-		return new \PHPixie\Route($name, $rule, $defaults, $methods);
-	}
-	
-	/**
-	 * Constructs a view
-	 *
-	 * @param string   $name The name of the template to use
-	 * @return \PHPixie\View
-	 */
-	public function view($name)
-	{
-		return new \PHPixie\View($this, $name);
-	}
-	
-	/**
-	 * Retrieve value from array by key, with default value support.
-	 *
-	 * @param array  $array   Input array
-	 * @param string $key     Key to retrieve from the array
-	 * @param mixed  $default Default value to return if the key is not found
-	 * @return mixed An array value if it was found or default value if it is not
-	 */
-	public function arr($array, $key, $default = null)
-	{
-		if (isset($array[$key]))
-			return $array[$key];
-		return $default;
-	}
-	
-	/**
-	 * Finds full path to a specified file in the /assets folders.
-	 * It will search in the application folder first, then in all enabled modules
-	 * and then the /assets folder of the framework.
-	 *
-	 * @param string  $subfolder  Subfolder to search in e.g. 'classes' or 'views'
-	 * @param string  $name       Name of the file without extension
-	 * @param string  $extension  File extension
-	 * @param boolean $return_all If 'true' returns all mathced files as array,
-	 *                            otherwise returns the first file found
-	 * @return mixed  Full path to the file or False if it is not found
-	 */
-	public function find_file($subfolder, $name, $extension = 'php', $return_all = false)
-	{
-		
-		$fname = $name.'.'.$extension;
-		$found_files = array();
-		foreach ($this->assets_dirs as $folder)
-		{
-			$file = $folder.$subfolder.'/'.$fname;
-			if (file_exists($file))
-			{
-				if (!$return_all)
-					return($file);
-					
-				$found_files[] = $file;
-			}
-		}
-		
-		if (!empty($found_files))
-			return $found_files;
-
-		return false;
-	}
-	
-	/**
-	 * Creates a Request representing current HTTP request.
-	 *
-	 * @return \PHPixie\Request
-	 */
-	public function http_request()
-	{
-		$uri = $_SERVER['REQUEST_URI'];
-		$uri = preg_replace("#^{$this->basepath}(?:index\.php/)?#i", '/', $uri);
-		$url_parts = parse_url($uri);
-		$route_data = $this->router->match($url_parts['path'], $_SERVER['REQUEST_METHOD']);
-		return $this->request($route_data['route'], $_SERVER['REQUEST_METHOD'], $_POST, $_GET, $route_data['params'], $_SERVER);
-	}
-	
-	/**
-	 * Processes HTTP request, executes it and sends back the response.
-	 *
-	 * @return void
-	 */
-	public function handle_http_request() {
-		try {
-		
-			$request =  $this->http_request();
-			$response = $request->execute();
-			$response->send_headers()->send_body();
-			
-		}catch (\Exception $e) {
-			$this->handle_exception($e);
-		}
-		
-	}
-	
-	/**
-	 * Exception handler. By default displays the error page.
-	 * If you want your exceptions to be handled in a specific way
-	 * you should override this method.
-	 *
-	 * @param \Exception $exception Exception to handle
-	 * @return void
-	 */
-	public function handle_exception($exception) {
-		$this->debug->render_exception_page($exception);
-	}
-	
-	/**
-	 * Bootstraps the project
-	 *
-	 * @param  string $root_dir Root directory of the application
-	 * @return void
-	 */
-	public function bootstrap($root_dir) {
-		if (substr($root_dir, -1) != '/')
-			$root_dir.= '/';
-			
-		$this->root_dir = $root_dir;
-		
-		if ($this->app_namespace === null) {
-			$class_name = get_class($this);
-			$this->app_namespace = substr($class_name, 0, strpos($class_name, "\\")+1);
-		}
-		$this->assets_dirs[] = dirname(dirname(dirname(__FILE__))).'/assets/';
-		$this->debug->init();
-		foreach($this->modules as $name=>$class) {
-			$this->$name = new $class($this);
-		}
-		array_unshift($this->assets_dirs, $this->root_dir.'assets/');
-		foreach($this->config->get('routes') as $name => $rule) 
-			$this->router->add($this->route($name, $rule[0], $rule[1], $this->arr($rule, 2, null)));
-			
-		$this->after_bootstrap();
-		
-		return $this;
-	}
-	
-	/**
-	 * Perform some initialization after bootstrap finished
-	 *
-	 * @return void
-	 */
-	protected function after_bootstrap() {}
-	
-		
-}

+ 0 - 200
frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Request.php

@@ -1,200 +0,0 @@
-<?php
-
-namespace PHPixie;
-
-/**
- * Handles client request.
- * @package Core
- */
-class Request
-{
-
-	/**
-	 * Pixie Dependancy Container
-	 * @var \PHPixie\Pixie
-	 */
-	protected $pixie;
-	
-	/**
-	 * Stores POST data
-	 * @var array
-	 */
-	protected $_post;
-
-	/**
-	 * Stores GET data
-	 * @var array
-	 */
-	protected $_get;
-
-	/**
-	 * Stores GET data
-	 * @var array
-	 */
-	protected $_param;
-	
-	/**
-	 * Current Route
-	 * @var Route
-	 */
-	public $route;
-
-	/**
-	 * Request method
-	 * @var string
-	 */
-	public $method;
-
-	/**
-	 * Creates a new request
-	 *
-	 * @param \PHPixie\Pixie $pixie Pixie dependency container
-	 * @param \PHPixie\Route  $route  Route for this request
-	 * @param  string $method HTTP method for the request (e.g. GET, POST)
-	 * @param  array  $post   Array of POST data
-	 * @param  array  $get    Array of GET data
-	 * @param  array  $server Array of SERVER data
-	 * @return Request Initialized request
-	 *
-	 */
-	public function __construct($pixie, $route, $method = "GET", $post = array(), $get = array(), $param=array(), $server = array())
-	{
-		$this->pixie = $pixie;
-		$this->route = $route;
-		$this->method = $method;
-		$this->_post = $post;
-		$this->_get = $get;
-		$this->_param = $param;
-		$this->_server = $server;
-	}
-
-	/**
-	 * Retrieves a GET parameter
-	 *
-	 * @param string $key    Parameter key
-	 * @param mixed $default Default value
-	 * @param bool  $filter_xss Whether to filter input for XSS protection
-	 * @return mixed Returns a value if a key is specified,
-	 *               or an array of GET parameters if it isn't.
-	 */
-	public function get($key = null, $default = null, $filter_xss=true)
-	{
-		if ($key == null)
-			return $this->_get;
-		$val = $this->pixie->arr($this->_get, $key, $default);
-		
-		if ($filter_xss)
-			return $this->filter_xss($val);
-			
-		return $val;
-	}
-
-	/**
-	 * Retrieves a POST parameter
-	 *
-	 * @param string $key    Parameter key
-	 * @param mixed $default Default value
-	 * @param bool  $filter_xss Whether to filter input for XSS protection
-	 * @return mixed Returns a value if a key is specified,
-	 *               or an array of POST parameters if it isn't.
-	 */
-	public function post($key = null, $default = null, $filter_xss=true)
-	{
-		if ($key == null)
-			return $this->_post;
-		$val = $this->pixie->arr($this->_post, $key, $default);
-		
-		if ($filter_xss)
-			return $this->filter_xss($val);
-			
-		return $val;
-	}
-
-	/**
-	 * Filters input to prevent XSS attacks.
-	 * If an array is passed, filters all its elements recursively.
-	 *
-	 * @param mixed $val  Input to sanitize.
-	 * @return mixed Filtered values
-	 */
-	public function filter_xss($val) {
-		if (is_array($val)) {
-			array_walk_recursive($val, function( &$str) {
-				$str = strip_tags($str);
-			});
-		}else {
-			$val = strip_tags($val);
-		}
-		
-		return $val;
-	}
-	
-	/**
-	 * Retrieves a SERVER parameter
-	 *
-	 * @param string $key    Parameter key
-	 * @param mixed  $default Default value
-	 * @return mixed Returns a value if a key is specified,
-	 *               or an array of SERVER parameters if it isn't.
-	 */
-	public function server($key = null, $default = null)
-	{
-		if ($key == null)
-			return $this->_server;
-		return $this->pixie->arr($this->_server, $key, $default);
-	}
-
-	/**
-	 * Retrieves a URL parameter
-	 *
-	 * @param string $key    Parameter key
-	 * @param mixed $default Default value
-	 * @param bool  $filter_xss Whether to filter input for XSS protection
-	 * @return mixed Returns a value if a key is specified,
-	 *               or an array of POST parameters if it isn't.
-	 */
-	public function param($key = null, $default = null, $filter_xss=true)
-	{
-		if ($key == null)
-			return $this->_param;
-		$val = $this->pixie->arr($this->_param, $key, $default);
-		
-		if ($filter_xss)
-			return $this->filter_xss($val);
-			
-		return $val;
-	}
-
-	/**
-	 * Initializes the routed Controller and executes specified action
-	 *
-	 * @return \PHPixie\Response A Response object with the body and headers set
-	 */
-	public function execute()
-	{
-		$class = $this->param('namespace',$this->pixie->app_namespace).'Controller\\'.ucfirst($this->param('controller'));
-		$controller = $this->pixie->controller($class);
-		$controller->request = $this;
-		$controller->run($this->param('action'));
-		return $controller->response;
-	}
-
-	/**
-	 * Gets request URL
-	 *
-	 * @param bool $with_params Whether to preserve URL parameters
-	 * @return string URL of this request
-	 */
-	public function url($with_params = false) {
-		$url = $this->server('HTTPS') == 'on' ? 'https://':'http://';
-		$url.= $this->server('HTTP_HOST').$this->server('REQUEST_URI');
-
-		if (!$with_params) {
-			$pos = strpos($url, '?');
-			if ($pos !== false)
-				$url = substr($url, 0, $pos);
-		}
-		return $url;
-	}
-	
-}

+ 0 - 71
frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Response.php

@@ -1,71 +0,0 @@
-<?php
-
-namespace PHPixie;
-
-/**
- * Handles the response that is sent back to the client.
- * @package Core
- */
-class Response
-{
-
-	/**
-	 * Headers for the response
-	 * @var array
-	 */
-	public $headers = array(
-		'Content-Type: text/html; charset=utf-8'
-	);
-
-	/**
-	 * Response body
-	 * @var string
-	 */
-	public $body;
-
-	/**
-	 * Add header to the response
-	 *
-	 * @param string $header Header content
-	 * @return void
-	 */
-	public function add_header($header)
-	{
-		$this->headers[] = $header;
-	}
-
-	/**
-	 * Add redirection header
-	 *
-	 * @param string $url URL to redirect the client to
-	 * @return void
-	 */
-	public function redirect($url)
-	{
-		$this->add_header("Location: $url");
-	}
-
-	/**
-	 * Sends headers to the client
-	 *
-	 * @return \PHPixie\Response Resturns itself
-	 */
-	public function send_headers()
-	{
-		foreach ($this->headers as $header)
-			header($header);
-		return $this;
-	}
-
-	/**
-	 * Send response body to the client
-	 *
-	 * @return \PHPixie\Response Resturns itself
-	 */
-	public function send_body()
-	{
-		echo $this->body;
-		return $this;
-	}
-
-}

+ 0 - 98
frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Route.php

@@ -1,98 +0,0 @@
-<?php
-
-namespace PHPixie;
-
-/**
- * Routing class to extract and parse request parameters from the URL.
- * @package Core
- */
-class Route
-{
-
-	/**
-	 * Name of the route.
-	 * @var string
-	 */
-	public $name;
-
-	/**
-	 * Rule for this route.
-	 * @var mixed
-	 */
-	public $rule;
-
-	/**
-	 * Default parameters for this route.
-	 * @var mixed
-	 */
-	public $defaults;
-
-	/**
-	 * Methods to restrict this route to.
-	 * @var array
-	 */
-	public $methods;
-
-	/**
-	 * Associative array of route instances.
-	 * @var array
-	 */
-	private static $routes = array();
-
-	/**
-	 * Constructs a route.
-	 *
-	 * @param string $name Name of the route
-	 * @param mixed $rule Rule for this route
-	 * @param array $defaults Default parameters for the route
-	 * @param mixed $methods Methods to restrict this route to.
-	 *                       Either a single method or an array of them.
-	 */
-	public function __construct($name, $rule, $defaults, $methods = null)
-	{
-		$this->name = $name;
-		$this->rule = $rule;
-		$this->defaults = $defaults;
-		if($methods != null){
-			if (is_string($methods))
-				$methods = array($methods);
-			$methods = array_map('strtoupper', $methods);
-		}
-		$this->methods = $methods;
-	}
-
-	/**
-	 * Generates a url for a route
-	 *
-	 * @param array $params    Parameters to substitute in the route
-	 * @param bool $absolute   Whether to return an absolute url
-	 * @param string $protocol	Protocol to use for absolute url
-	 * @return string Generated url
-	 */
-	public function url($params = array(), $absolute = false, $protocol = 'http')
-	{
-		if (is_callable($this->rule))
-			throw new \Exception("The rule for '{$this->name}' route is a function and cannot be reversed");
-
-		$url = is_array($this->rule) ? $this->rule[0] : $this->rule;
-
-		$replace = array();
-		$params = array_merge($this->defaults, $params);
-		foreach ($params as $key => $value)
-			$replace["<{$key}>"] = $value;
-		$url = str_replace(array_keys($replace), array_values($replace), $url);
-
-		$count = 1;
-		$chars = '[^\(\)]*?';
-		while ($count > 0)
-			$url = preg_replace("#\({$chars}<{$chars}>{$chars}\)#", '', $url, -1, $count);
-
-		$url = str_replace(array('(', ')'), '', $url);
-
-		if ($absolute)
-			$url = $protocol.'://'.$_SERVER['HTTP_HOST'].$url;
-
-		return $url;
-	}
-
-}

+ 0 - 132
frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Router.php

@@ -1,132 +0,0 @@
-<?php
-namespace PHPixie;
-
-/**
- * Router for matching URLs to corresponding Routes
- * @package Core
- */
-class Router {
-
-	/**
-	 * Pixie Dependancy Container
-	 * @var \PHPixie\Pixie
-	 */
-	protected $pixie;
-	
-	/**
-	 * Associative array of route instances.
-	 * @var array
-	 */
-	protected $routes = array();
-	
-	/**
-	 * Constructs a router
-	 *
-	 * @param \PHPixie\Pixie $pixie Pixie dependency container
-	 */
-	public function __construct($pixie) {
-		$this->pixie = $pixie;
-	}
-
-	
-	/**
-	 * Ads a route
-	 *
-	 * @param string $name     Name of the route. Routes with the same name will override one another.
-	 * @param mixed $rule     Either an expression to match URI against or a function that will
-	 *                        be passed the URI and must return either an associative array of
-	 *                        extracted parameters (if it matches) or False.
-	 * @param array   $defaults An associated array of default values.
-	 * @return void
-	 */
-	public function add($route)
-	{
-		$this->routes[$route->name] = $route;
-	}
-
-	/**
-	 * Gets route by name
-	 *
-	 * @param string $name Route name
-	 * @return \PHPixie\Route
-	 * @throws \Exception If specified route doesn't exist
-	 */
-	public function get($name)
-	{
-		if (!isset($this->routes[$name]))
-			throw new \Exception("Route {$name} not found.");
-
-		return $this->routes[$name];
-	}
-
-	/**
-	 * Matches the URI against available routes to find the correct one.
-	 *
-	 * @param string   $uri Request URI
-	 * @param string   $method Request method
-	 * @return array Array containing route and matched parameters
-	 * @throws \PHPixie\Exception\PageNotFound If no route matches the URI
-	 * @throws \PHPixie\Exception\PageNotFound If route matched but no Controller was defined for it
-	 * @throws \PHPixie\Exception\PageNotFound If route matched but no action was defined for it
-	 */
-	public function match($uri, $method = 'GET')
-	{
-		$matched = false;
-		$method = strtoupper($method);
-		foreach ($this->routes as $name => $route) {
-			if ($route-> methods != null && !in_array($method, $route->methods))
-				continue;
-			
-			$rule = $route->rule;
-			if (is_callable($rule))
-			{
-				if (($data = $rule($uri)) !== FALSE)
-				{
-					$matched = $name;
-					break;
-				}
-			}
-			else
-			{
-				$pattern = is_array($rule) ? $rule[0] : $rule;
-				$pattern = str_replace(')', ')?', $pattern);
-				$pixie=$this->pixie;
-				$pattern = preg_replace_callback('/<.*?>/', function($str) use ($rule, $pixie) {
-						$str = $str[0];
-						$regexp = '[a-zA-Z0-9\-\._]+';
-						if (is_array($rule))
-							$regexp = $pixie->arr($rule[1], str_replace(array('<', '>'), '', $str), $regexp);
-						return '(?P'.$str.$regexp.')';
-					}, $pattern);
-
-				preg_match('#^'.$pattern.'/?$#', $uri, $match);
-				if (!empty($match[0]))
-				{
-					$matched = $name;
-					$data = array();
-					foreach ($match as $k => $v)
-						if (!is_numeric($k))
-							$data[$k] = $v;
-					break;
-				}
-			}
-		}
-		if ($matched == false)
-			throw new \PHPixie\Exception\PageNotFound('No route matched your request');
-			
-		$route = $this->routes[$matched];
-		$params = array_merge($route->defaults, $data);
-		
-		if (!isset($params['controller']))
-			throw new \PHPixie\Exception\PageNotFound("Route {$matched} matched, but no controller was defined for this route");
-			
-		if (!isset($params['action']))
-			throw new \PHPixie\Exception\PageNotFound("Route {$matched} matched with controller {$params['controller']}, but no action was defined for this route");
-
-		return array(
-					'route'=>$route, 
-					'params'=>$params
-					);
-	}
-	
-}

+ 0 - 119
frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/Session.php

@@ -1,119 +0,0 @@
-<?php
-
-namespace PHPixie;
-
-/**
- * Simple class for accessing session data
- * @package Core
- */
-class Session
-{
-
-	/**
-	 * Pixie Dependancy Container
-	 * @var \PHPixie\Pixie
-	 */
-	protected $pixie;
-	
-	/**
-	 * Constructs session handler
-	 *
-	 * @param \PHPixie\Pixie $pixie Pixie dependency container
-	 */
-	public function __construct($pixie) {
-		$this->pixie=$pixie;
-	}
-	/**
-	 * Makes sure the session is initialized
-	 *
-	 * @return void
-	 */
-	private function check()
-	{
-		if (!session_id())
-		{
-			session_start();
-		}
-	}
-
-	/**
-	 * Gets a session variable
-	 *
-	 * @param string $key     Variable name
-	 * @param mixed $default Default value
-	 * @return mixed Session value
-	 */
-	public function get($key, $default = null)
-	{
-		$this->check();
-		return $this->pixie->arr($_SESSION, $key, $default);
-	}
-
-	/**
-	 * Sets a session variable
-	 *
-	 * @param string $key Variable name
-	 * @param mixed $val Variable value
-	 * @return void
-	 */
-	public function set($key, $val)
-	{
-		$this->check();
-		$_SESSION[$key] = $val;
-	}
-
-	/**
-	 * Removes a session variable
-	 *
-	 * @param string $key Variable name
-	 * @return void
-	 */
-	public function remove($key)
-	{
-		$this->check();
-
-		if (!isset($_SESSION[$key]))
-			return;
-
-		$var = $_SESSION[$key];
-		unset($_SESSION[$key], $var);
-	}
-
-	/**
-	 * Resets the session
-	 *
-	 * @return void
-	 */
-	public function reset()
-	{
-		$this->check();
-		$_SESSION = array();
-	}
-
-	/**
-	 * Gets ot sets flash messages.
-	 * If the value parameter is passed the message is set, otherwise it is retrieved.
-	 * After the message is retrieved for the first time it is removed.
-	 *
-	 * @param $key  The name of the flash message
-	 * @param $val  Flash message content
-	 * @return mixed
-	 */
-	public function flash($key, $val = null)
-	{
-		$this->check();
-		$key = "flash_{$key}";
-		if ($val != null)
-		{
-			$this->set($key, $val);
-		}
-		else
-		{
-			$val = $this->get($key);
-			$this->remove($key);
-		}
-
-		return $val;
-	}
-
-}

+ 0 - 106
frameworks/PHP/phpixie/vendor/phpixie/core/classes/PHPixie/View.php

@@ -1,106 +0,0 @@
-<?php
-
-namespace PHPixie;
-
-/**
- * Manages passing variables to templates and rendering them
- * @package Core
- */
-class View
-{
-	/**
-	 * Pixie Dependancy Container
-	 * @var \PHPixie\Pixie
-	 */
-	protected $pixie;
-	
-	/**
-	 * Full path to template file
-	 * @var string
-	 */
-	protected $path;
-
-	/**
-	 * The name of the view.
-	 * @var string
-	 */
-	public $name;
-
-	/**
-	 * Stores all the variables passed to the view
-	 * @var array
-	 */
-	protected $_data = array();
-
-	/**
-	 * File extension of the templates
-	 * @var string
-	 */
-	protected $_extension = 'php';
-
-	/**
-	 * Constructs the view
-	 *
-	 * @param \PHPixie\Pixie $pixie Pixie dependency container
-	 * @param string   $name The name of the template to use
-	 * @throws \Exception If specified template is not found
-	 */
-	public function __construct($pixie, $name)
-	{
-		$this->pixie = $pixie;
-		$this->name = $name;
-		$file = $this->pixie->find_file('views', $name, $this->_extension);
-			
-		if ($file == false)
-			throw new \Exception("View {$name} not found.");
-
-		$this->path = $file;
-	}
-
-	/**
-	 * Manages storing the data passed to the view as properties
-	 *
-	 * @param string $key Property name
-	 * @param string $val Property value
-	 * @return void
-	 */
-	public function __set($key, $val)
-	{
-		$this->_data[$key] = $val;
-	}
-
-	/**
-	 * Manages accessing passed data as properties
-	 *
-	 * @param string   $key Property name
-	 * @return mixed	Property value
-	 * @throws \Exception If the property is not found
-	 */
-	public function __get($key)
-	{
-		if (isset($this->_data[$key]))
-			return $this->_data[$key];
-		throw new \Exception("Value {$key} not set for view {$this->name}");
-	}
-
-	/**
-	 * Renders the template, all dynamically set properties
-	 * will be available inside the view file as variables.
-	 * Example:
-	 * <code>
-	 * $view = $this->pixie->view('frontpage');
-	 * $view->title = "Page title";
-	 * echo $view->render();
-	 * </code>
-	 *
-	 * @return string Rendered template
-	 */
-	public function render()
-	{
-		extract($this->_data);
-		ob_start();
-		include($this->path);
-		return ob_get_clean();
-	}
-	
-}

+ 0 - 26
frameworks/PHP/phpixie/vendor/phpixie/core/composer.json

@@ -1,26 +0,0 @@
-{
-    "name": "phpixie/core",
-    "description": "PHPixie Framework",
-    "keywords": ["framework"],
-    "homepage": "http://phpixie.com",
-    "type": "library",
-    "license": "BSD",
-    "authors": [
-        {
-            "name": "Roman Tsiupa",
-            "email": "[email protected]",
-            "homepage": "http://dracony.org"
-        }
-    ],
-    "require": {
-        "php": ">=5.3.0"
-    },
-    "autoload": {
-        "psr-0": {"PHPixie": "classes/"}
-    },
-    "extra": {
-        "branch-alias": {
-            "dev-master": "2.*-dev"
-        }
-    }
-}

+ 0 - 10
frameworks/PHP/phpixie/vendor/phpixie/core/tests/bootstrap.php

@@ -1,10 +0,0 @@
-<?php
-if(!defined('INIT')) {	
-	define('ROOT',dirname(dirname(dirname(dirname(dirname(__FILE__))))));
-	$loader = require_once(ROOT.'/vendor/autoload.php');
-	$loader->add('PHPixie', ROOT.'/vendor/phpixie/core/classes/');
-	$loader->add('PHPixie', ROOT.'/vendor/phpixie/db/classes/');
-	$loader->add('PHPixie',ROOT.'/vendor/phpixie/orm/classes/');
-	define('INIT', true);
-}
-	

+ 0 - 108
frameworks/PHP/phpixie/vendor/phpixie/core/tests/configTest.php

@@ -1,108 +0,0 @@
-<?php
-
-
-
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2013-02-06 at 09:17:25.
- */
-class configTest extends PHPUnit_Framework_TestCase
-{
-
-	/**
-	 * @var Config
-	 */
-	protected $object;
-
-	/**
-	 * Sets up the fixture, for example, opens a network connection.
-	 * This method is called before a test is executed.
-	 */
-	protected function setUp()
-	{
-		$this->file = $file = tempnam(sys_get_temp_dir(), 'view');
-		file_put_contents($file, "<?php return ".var_export(array(
-				'trees' => array(
-					'oak' => array(
-						'fairy' => 'Tinkerbell'
-					)
-				)
-				), true).';');
-		$pixie = $this->getMock("\\PHPixie\\Pixie", array('find_file'));
-		$pixie->expects($this->once())
-                 ->method('find_file')
-                 ->will($this->returnValue($this->file));
-		$this->object = new \PHPixie\Config($pixie);
-	}
-
-	/**
-	 * Tears down the fixture, for example, closes a network connection.
-	 * This method is called after a test is executed.
-	 */
-	protected function tearDown()
-	{
-		unlink($this->file);
-	}
-
-	/**
-	 * @covers $this->object->get_group
-	 * @todo   Implement testGet_group().
-	 */
-	public function testGet_group()
-	{
-		$group = $this->object->get_group('test');
-		$this->assertArrayHasKey('trees', $group);
-		$this->assertArrayHasKey('oak', $group['trees']);
-		$this->assertArrayHasKey('fairy', $group['trees']['oak']);
-		$this->assertEquals($group['trees']['oak']['fairy'], 'Tinkerbell');
-	}
-
-	/**
-	 * @covers $this->object->get
-	 * @todo   Implement testGet().
-	 */
-	public function testGet()
-	{
-		$this->assertEquals($this->object->get('test.trees.oak.fairy'), 'Tinkerbell');
-		$this->assertEquals($this->object->get('test.trees.oak.fairies', 'default'), 'default');
-	}
-
-	/**
-	 * @covers $this->object->set
-	 * @todo   Implement testSet().
-	 */
-	public function testSet()
-	{
-		$this->object->set('test.trees.oak.second_fairy', 'Trixie');
-		$this->assertEquals($this->object->get('test.trees.oak.second_fairy'), 'Trixie');
-	}
-
-	/**
-	 * @covers $this->object->write
-	 * @todo   Implement testWrite().
-	 */
-	public function testWrite()
-	{
-		$this->object->set('test.trees.oak.second_fairy', 'Trixie');
-		$this->object->write('test');
-		$group = include($this->file);
-		$this->assertArrayHasKey('trees', $group);
-		$this->assertArrayHasKey('oak', $group['trees']);
-		$this->assertArrayHasKey('second_fairy', $group['trees']['oak']);
-		$this->assertEquals($group['trees']['oak']['second_fairy'], 'Trixie');
-	}
-	
-	public function testEmpty()
-	{
-		file_put_contents($this->file, '');
-		$this->assertEquals($this->object->get('test.trees.oak.fairies', 'default'), 'default');
-		$this->object->set('test.trees.oak.second_fairy', 'Trixie');
-		$this->assertEquals($this->object->get('test.trees.oak.second_fairy'), 'Trixie');
-		$this->object->write('test');
-		$group = $this->object->get('test');
-		$this->assertArrayHasKey('trees', $group);
-		$this->assertArrayHasKey('oak', $group['trees']);
-		$this->assertArrayHasKey('second_fairy', $group['trees']['oak']);
-		$this->assertEquals($group['trees']['oak']['second_fairy'], 'Trixie');
-	}
-
-}

+ 0 - 58
frameworks/PHP/phpixie/vendor/phpixie/core/tests/controllerTest.php

@@ -1,58 +0,0 @@
-<?php
-require_once(ROOT.'/vendor/phpixie/core/classes/PHPixie/Controller.php');
-class TestController extends \PHPixie\Controller {
-	public $counter = 0;
-	public function before() {
-		$this->counter++;
-	}
-	public function action_index() {
-		$this->counter++;
-	}
-	public function after() {
-		$this->counter++;
-	}
-}
-
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2013-02-05 at 16:39:57.
- */
-class ControllerTest extends PHPUnit_Framework_TestCase
-{
-
-	/**
-	 * @var Controller
-	 */
-	protected $object;
-
-	/**
-	 * Sets up the fixture, for example, opens a network connection.
-	 * This method is called before a test is executed.
-	 */
-	protected function setUp()
-	{
-		$this->object = new TestController(null);
-	}
-	
-	public function testRedirect() {
-		$this->object->redirect('http://google.com');
-		$this->assertEquals(false,$this->object->execute);
-		$this->assertContains('Location: http://google.com', $this->object->response->headers);
-	}
-	public function testRun()
-	{
-		$this->object->run('index');
-		$this->assertEquals($this->object->counter, 3);
-	}
-
-	public function testException()
-	{
-		$except = false;
-		try {
-			$this->object->run('bogus');
-		} catch (\PHPixie\Exception\PageNotFound $e) {
-			$except = true;
-		}
-		$this->assertEquals($except, true);
-	}
-
-}

+ 0 - 1
frameworks/PHP/phpixie/vendor/phpixie/core/tests/phpunit.xml

@@ -1 +0,0 @@
-<phpunit bootstrap="bootstrap.php"></phpunit>

+ 0 - 105
frameworks/PHP/phpixie/vendor/phpixie/core/tests/pixieTest.php

@@ -1,105 +0,0 @@
-<?php
-namespace PixieTest {
-	require_once(ROOT.'/vendor/phpixie/core/classes/PHPixie/Pixie.php');
-	class Pixie extends \PHPixie\Pixie { 
-		public $basepath = '/tester/';
-		protected $modules = array(
-			'mod'=>'\PixieTest\PixieMod'
-		);
-		protected $instance_classes = array(
-		'config'  => '\PixieTest\Config',
-		'debug'   => '\PHPixie\Debug',
-		'router'  => '\PHPixie\Router'
-	);
-	}
-	class PixieMod { }
-	class Config {
-		public function get() {
-			return array();
-		}
-	}
-	class TestController extends \PHPixie\Controller {}
-}
-namespace {
-	/**
-	 * Generated by PHPUnit_SkeletonGenerator 1.2.0 on 2013-04-15 at 21:57:25.
-	 */
-	class PixieTest extends PHPUnit_Framework_TestCase
-	{
-		/**
-		 * @var Pixie
-		 */
-		protected $object;
-
-		/**
-		 * Sets up the fixture, for example, opens a network connection.
-		 * This method is called before a test is executed.
-		 */
-		protected function setUp()
-		{
-			$this->object = new \PixieTest\Pixie();
-			$this->object->bootstrap(sys_get_temp_dir());
-		}
-		
-		public function testBootstrap() {
-			$this->assertEquals("PixieTest\\", $this->object->app_namespace);
-			$this->assertEquals(true, $this->object->mod instanceof \PixieTest\PixieMod );
-			$this->assertEquals(true, $this->object->config instanceof \PixieTest\Config );
-			$this->assertEquals('/', substr($this->object->root_dir,-1));
-		}
-		
-		public function testArr() {
-			$this->assertEquals('a', $this->object->arr(array('c'=>'a'),'c','b'));
-			$this->assertEquals('b', $this->object->arr(array('c'=>'a'),'d','b'));
-		}
-		
-		public function testHttp_Request() {
-			$this->object->router->add(new \PHPixie\Route('default', '/<controller>/<action>', array()));
-			$_SERVER['REQUEST_URI'] = "/tester/home/index";
-			$_POST['post'] = "test";
-			$_GET['get'] = "test";
-			$_SERVER['REQUEST_METHOD'] = "POST";
-			$req = $this->object->http_request();
-			$this->assertEquals($req->get('get'), 'test');
-			$this->assertEquals($req->post('post'), 'test');
-			$this->assertEquals($req->server('REQUEST_METHOD'), 'POST');
-			$this->assertEquals($req->method, 'POST');
-			$this->assertEquals($req->param('controller'), 'home');
-			$this->assertEquals($req->param('action'), 'index');
-		}
-		
-		public function testFind_file() {
-			$dir = $this->object->root_dir.'/assets';
-			if(!is_dir($dir))
-				mkdir($dir);
-			file_put_contents($dir.'/test.php','');
-			$file = $this->object->find_file('','test');
-			$this->assertEquals(true, strpos($file, 'test.php') > 0);
-			unlink($dir.'/test.php');
-			rmdir($dir);
-		}
-		
-		public function testResponse() {
-			$this->assertEquals('PHPixie\Response', get_class($this->object->response()));
-		}
-		
-		public function testRoute() {
-			$route = $this->object->route('a','/',array(),'POST');
-			$this->assertEquals('PHPixie\Route', get_class($route));
-			$this->assertEquals('POST', $route->methods[0]);
-		}
-		public function testRequest() {
-			$this->assertEquals('PHPixie\Request', get_class($this->object->request(null)));
-		}
-		public function testController() {
-			$this->assertEquals('PixieTest\TestController', get_class($this->object->controller('\PixieTest\TestController')));
-		}
-		public function testView() {
-			$mock = $this->getMock('\PixieTest\Pixie', array('find_file'));
-			$mock->expects($this->once())
-                 ->method('find_file')
-                 ->will($this->returnValue('test'));
-			$this->assertEquals('PHPixie\View', get_class($mock->view('test')));
-		}
-	}
-}

+ 0 - 158
frameworks/PHP/phpixie/vendor/phpixie/core/tests/requestTest.php

@@ -1,158 +0,0 @@
-<?php
-namespace Controller {
-
-	class TestController extends \PHPixie\Controller {
-		public function action_index(){}
-	}
-}
-
-namespace {
-
-
-
-	/**
-	 * Generated by PHPUnit_SkeletonGenerator on 2013-02-06 at 16:12:22.
-	 */
-	class requestTest extends PHPUnit_Framework_TestCase
-	{
-
-		/**
-		 * @var Request
-		 */
-		protected $object;
-
-		/**
-		 * Sets up the fixture, for example, opens a network connection.
-		 * This method is called before a test is executed.
-		 */
-		protected function setUp()
-		{
-			$this->pixie = new \PHPixie\Pixie();
-			$this->pixie->app_namespace = "";
-			$this->object = new \PHPixie\Request(
-				$this->pixie,
-				new \PHPixie\Route('test',array(),array()),
-				'GET', 
-				array('fairy_post' => 'Trixie', 'xss' => 'a<div></div>','xss_arr'=>array(array('a<div></div>'))), 
-				array('fairy_get' => 'Trixie', 'xss' => 'a<div></div>', 'xss_arr' => array(array('a<div></div>'))), 
-				array('controller' => 'TestController', 'action' => 'index', 'fairy_param' => 'Trixie'),
-				array('fairy_server' => 'Trixie','HTTP_HOST'=>'phpixie.com','REQUEST_URI'=>'/test/?test=test')
-			);
-		}
-
-		/**
-		 * Tears down the fixture, for example, closes a network connection.
-		 * This method is called after a test is executed.
-		 */
-		protected function tearDown()
-		{
-
-		}
-		
-		/**
-		 * @covers Request::filter_xss
-		 * 
-		 */
-		public function testFilter_Xss()
-		{
-			$this->assertEquals($this->object->filter_xss('a<div></div>'), 'a');
-			$this->assertEquals(current(current($this->object->filter_xss(array(array('a<div></div>'))))), 'a');
-		}
-
-		/**
-		 * @covers Request::get
-		 * @todo   Implement testGet().
-		 */
-		public function testGet()
-		{
-			$this->assertEquals($this->object->get('fairy_get'), 'Trixie');
-			$this->assertEquals($this->object->get('bogus', 'default'), 'default');
-			$this->assertEquals($this->object->get('xss'), 'a');
-			$this->assertEquals($this->object->get('xss', null, false), 'a<div></div>');
-			$this->assertEquals(current(current($this->object->get('xss_arr', null, false))), 'a<div></div>');
-			$this->assertEquals(current(current($this->object->get('xss_arr'))), 'a');
-		}
-
-		/**
-		 * @covers Request::post
-		 * @todo   Implement testPost().
-		 */
-		public function testPost()
-		{
-			$this->assertEquals($this->object->post('fairy_post'), 'Trixie');
-			$this->assertEquals($this->object->post('bogus', 'default'), 'default');
-			$this->assertEquals($this->object->post('xss'), 'a');
-			$this->assertEquals($this->object->post('xss', null, false), 'a<div></div>');
-			$this->assertEquals(current(current($this->object->post('xss_arr', null, false))), 'a<div></div>');
-			$this->assertEquals(current(current($this->object->post('xss_arr'))), 'a');
-		}
-
-		/**
-		 * @covers Request::server
-		 * @todo   Implement testServer().
-		 */
-		public function testServer()
-		{
-			$this->assertEquals($this->object->server('fairy_server'), 'Trixie');
-			$this->assertEquals($this->object->server('bogus', 'default'), 'default');
-		}
-
-		/**
-		 * @covers Request::param
-		 * @todo   Implement testParam().
-		 */
-		public function testParam()
-		{
-			$this->assertEquals($this->object->param('fairy_param'), 'Trixie');
-			$this->assertEquals($this->object->param('bogus', 'default'), 'default');
-		}
-
-		/**
-		 * @covers Request::execute
-		 * @todo   Implement testExecute().
-		 */
-		public function testExecute()
-		{
-			$this->object->execute();
-		}
-
-		/**
-		 * @covers Request::url
-		 */
-		public function testUrl()
-		{
-			$this->assertEquals('http://phpixie.com/test/', $this->object->url());
-			$this->assertEquals('http://phpixie.com/test/?test=test', $this->object->url(true));
-			$this->object = new \PHPixie\Request($this->pixie, $this->object->route, 'GET', array(), array(), array(),
-				array('HTTPS' => 'on','HTTP_HOST'=>'phpixie.com','REQUEST_URI'=>'/test/?test=test')
-			);
-			$this->assertEquals('https://phpixie.com/test/', $this->object->url());
-			$this->assertEquals('https://phpixie.com/test/?test=test', $this->object->url(true));
-			
-		}
-		/**
-		 * @covers Request::execute
-		 * @todo   Implement testExecute().
-		 */
-		public function testExecuteException()
-		{
-			$req = new \PHPixie\Request(
-				$this->pixie,
-				new \PHPixie\Route('test',array(),array()),
-				'GET', 
-				array('fairy_post' => 'Trixie', 'xss' => 'a<div></div>','xss_arr'=>array(array('a<div></div>'))), 
-				array('fairy_get' => 'Trixie', 'xss' => 'a<div></div>', 'xss_arr' => array(array('a<div></div>'))), 
-				array('controller' => 'bogus', 'action' => 'index', 'fairy_param' => 'Trixie'),
-				array('fairy_server' => 'Trixie','HTTP_HOST'=>'phpixie.com','REQUEST_URI'=>'/test/?test=test')
-			);
-			$except = false;
-			try {
-				$req->execute();
-			} catch (Exception $e) {
-				$except = true;
-			}
-			$this->assertEquals($except, true);
-		}
-
-	}
-}

+ 0 - 66
frameworks/PHP/phpixie/vendor/phpixie/core/tests/responseTest.php

@@ -1,66 +0,0 @@
-<?php
-
-/**
- * Generated by PHPUnit_SkeletonGenerator 1.2.0 on 2013 - 02 - 05 at 23:08:34.
- */
-class ResponseTest extends PHPUnit_Framework_TestCase
-{
-
-	/**
-	 * @var Response
-	 */
-	protected $object;
-
-	/**
-	 * Sets up the fixture, for example, opens a network connection.
-	 * This method is called before a test is executed.
-	 */
-	protected function setUp()
-	{
-		$this->object = new \PHPixie\Response;
-	}
-
-	/**
-	 * Tears down the fixture, for example, closes a network connection.
-	 * This method is called after a test is executed.
-	 */
-	protected function tearDown()
-	{
-
-	}
-
-	/**
-	 * @covers Response::add_header
-	 * @todo   Implement testAdd_header().
-	 */
-	public function testAdd_header()
-	{
-		$this->object->add_header('test');
-		$this->assertEquals(end($this->object->headers), 'test');
-	}
-
-	/**
-	 * @covers Response::redirect
-	 * @todo   Implement testRedirect().
-	 */
-	public function testRedirect()
-	{
-		$this->object->redirect('http://google.com');
-		$this->assertContains('Location: http://google.com', $this->object->headers);
-	}
-
-	/**
-	 * @covers Response::send_body
-	 * @todo   Implement testSend_body().
-	 */
-	public function testSend_body()
-	{
-		$this->object->body = 'test';
-		ob_start();
-		$this->object->send_body();
-		$out = ob_get_contents();
-		ob_end_clean();
-		$this->assertEquals($out, 'test');
-	}
-
-}

+ 0 - 43
frameworks/PHP/phpixie/vendor/phpixie/core/tests/routeTest.php

@@ -1,43 +0,0 @@
-<?php
-
-/**
- * Generated by PHPUnit_SkeletonGenerator 1.2.0 on 2013-02-10 at 16:36:42.
- */
-class RoteTest extends PHPUnit_Framework_TestCase
-{
-
-	/**
-	 * @var Route
-	 */
-	protected $object;
-
-	/**
-	 * Sets up the fixture, for example, opens a network connection.
-	 * This method is called before a test is executed.
-	 */
-	protected function setUp()
-	{
-		$this->object = new \PHPixie\Route('url', '(/<controller>(/<action>(/<id>)))', array(
-			'controller' => 'home',
-			'action' => 'index'
-		),'test');
-	}
-
-	/**
-	 * Tears down the fixture, for example, closes a network connection.
-	 * This method is called after a test is executed.
-	 */
-	protected function tearDown()
-	{
-
-	}
-
-	public function testUrl()
-	{
-
-		$this->assertEquals('/home/index/5', $this->object->url(array('id' => 5)));
-		$this->assertEquals('/home/index', $this->object->url());
-		$this->assertEquals('TEST', $this->object->methods[0]);
-	}
-
-}

+ 0 - 132
frameworks/PHP/phpixie/vendor/phpixie/core/tests/routerTest.php

@@ -1,132 +0,0 @@
-<?php
-
-/**
- * Generated by PHPUnit_SkeletonGenerator 1.2.0 on 2013-02-10 at 16:36:42.
- */
-class RoterTest extends PHPUnit_Framework_TestCase
-{
-
-	/**
-	 * @var Router
-	 */
-	protected $object;
-
-	/**
-	 * Sets up the fixture, for example, opens a network connection.
-	 * This method is called before a test is executed.
-	 */
-	protected function setUp()
-	{
-		$this->object=new \PHPixie\Router(new \PHPixie\Pixie);
-	}
-
-	/**
-	 * Tears down the fixture, for example, closes a network connection.
-	 * This method is called after a test is executed.
-	 */
-	protected function tearDown()
-	{
-
-	}
-
-	/**
-	 * @covers Route::get
-	 * @todo   Implement testGet().
-	 */
-	public function testGet()
-	{
-		$except = false;
-		$this->object->add(new \PHPixie\Route('a', 'b', array()));
-		try {
-			$this->object->get('c');
-		} catch (\Exception $e) {
-			$except = true;
-		}
-		$this->assertEquals(true, $except);
-	}
-
-	/**
-	 * @covers Route::match
-	 * @todo   Implement testMatch().
-	 */
-	public function testMatchFunc()
-	{
-		$this->object->add(new \PHPixie\Route('func', function() {
-				return array('action' => 'index');
-			}, array('controller' => 'home')));
-		$route = $this->object->match('/test');
-		$this->assertEquals('func',  $route['route']->name);
-		$this->assertEquals('index', $route['params']['action']);
-		$this->assertEquals('home', $route['params']['controller']);
-	}
-
-	/**
-	 * @covers Route::match
-	 * @todo   Implement testMatch().
-	 */
-	public function testMatchDefault()
-	{
-		$this->object->add(new \PHPixie\Route('default', '(/<controller>(/<action>(/<id>)))', array(
-			'controller' => 'home',
-			'action' => 'index'
-		)));
-		$route = $this->object->match('/');
-		$this->assertEquals('default', $route['route']->name);
-		$this->assertEquals('index', $route['params']['action']);
-		$this->assertEquals('home', $route['params']['controller']);
-
-		$route = $this->object->match('/test');
-		$this->assertEquals('default', $route['route']->name);
-		$this->assertEquals('index', $route['params']['action']);
-		$this->assertEquals('test', $route['params']['controller']);
-
-		$route = $this->object->match('/test/act');
-		$this->assertEquals('default', $route['route']->name);
-		$this->assertEquals('act', $route['params']['action']);
-		$this->assertEquals('test', $route['params']['controller']);
-
-		$route = $this->object->match('/test/act/8');
-		$this->assertEquals('default', $route['route']->name);
-		$this->assertEquals('act', $route['params']['action']);
-		$this->assertEquals('test', $route['params']['controller']);
-		$this->assertEquals(8, $route['params']['id']);
-	}
-
-	/**
-	 * @covers Route::match
-	 * @todo   Implement testMatch().
-	 */
-	public function testMatchCustom()
-	{
-		$this->object->add(new \PHPixie\Route('default', array('/<alpha><num>', array(
-				'alpha' => '[a-z]*',
-				'num' => '[0-9]*'
-			)), array(
-			'controller' => 'home',
-			'action' => 'index'
-		)));
-		$route = $this->object->match('/test123');
-		$this->assertEquals('default', $route['route']->name);
-		$this->assertEquals('index', $route['params']['action']);
-		$this->assertEquals('home', $route['params']['controller']);
-		$this->assertEquals('test', $route['params']['alpha']);
-		$this->assertEquals(123, $route['params']['num']);
-	}
-	
-	public function testMatchMethod() {
-		$this->object->add(new \PHPixie\Route('get', '/url', array(
-			'controller' => 'home',
-			'action' => 'get'
-		), 'GeT'));
-		$this->object->add(new \PHPixie\Route('post', '/url', array(
-			'controller' => 'home',
-			'action' => 'get'
-		), array('PosT')));
-		$route = $this->object->match('/url', 'GEt');
-		$this->assertEquals('get', $route['route']->name);
-		$route = $this->object->match('/url', 'POST');
-		$this->assertEquals('post', $route['route']->name);
-	}
-
-
-}

+ 0 - 91
frameworks/PHP/phpixie/vendor/phpixie/core/tests/sessionTest.php

@@ -1,91 +0,0 @@
-<?php
-require_once(ROOT.'/vendor/phpixie/core/classes/PHPixie/Session.php');
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2013 - 02 - 06 at 08:47:19.
- * @runTestsInSeparateProcesses
- */
-class sessionTest extends PHPUnit_Framework_TestCase
-{
-
-	/**
-	 * @var Session
-	 */
-	protected $object;
-
-	/**
-	 * Sets up the fixture, for example, opens a network connection.
-	 * This method is called before a test is executed.
-	 */
-	protected function setUp()
-	{
-		$this->object = new \PHPixie\Session(new \PHPixie\Pixie);
-	}
-
-	/**
-	 * Tears down the fixture, for example, closes a network connection.
-	 * This method is called after a test is executed.
-	 */
-	protected function tearDown()
-	{
-		session_destroy();
-	}
-
-	/**
-	 * @covers $this->object->get
-	 * @todo   Implement testGet().
-	 */
-	public function testGet()
-	{
-		session_start();
-		$_SESSION['test'] = 'TEST';
-		$this->assertEquals($this->object->get('test'), 'TEST');
-		$this->assertEquals($this->object->get('bogus', false), false);
-	}
-
-	/**
-	 * @covers $this->object->set
-	 * @todo   Implement testSet().
-	 */
-	public function testSet()
-	{
-		$this->object->set('testSet', 'test');
-		$this->assertArrayHasKey('testSet', $_SESSION);
-		$this->assertEquals('test', $_SESSION['testSet']);
-	}
-
-	/**
-	 * @covers $this->object->remove
-	 * @todo   Implement testRemove().
-	 */
-	public function testRemove()
-	{
-		session_start();
-		$_SESSION['test'] = 'TEST';
-		$this->object->remove('test');
-		$this->assertEquals(false, isset($_SESSION['test']));
-	}
-
-	/**
-	 * @covers $this->object->reset
-	 * @todo   Implement testReset().
-	 */
-	public function testReset()
-	{
-		session_start();
-		$_SESSION['test'] = 'TEST';
-		$this->object->reset();
-		$this->assertEquals(0, count($_SESSION));
-	}
-
-	/**
-	 * @covers $this->object->flash
-	 */
-	public function testFlash()
-	{
-		$this->object->flash('test', 'Trixie');
-		$this->object->flash('test', 'Tinkerbell');
-		$this->assertEquals('Tinkerbell', $this->object->flash('test'));
-		$this->assertEquals(null, $this->object->flash('test'));
-	}
-
-}

+ 0 - 54
frameworks/PHP/phpixie/vendor/phpixie/core/tests/viewTest.php

@@ -1,54 +0,0 @@
-<?php
-
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2013-02-05 at 09:23:37.
- */
-class ViewTest extends PHPUnit_Framework_TestCase
-{
-
-	/**
-	 * @var View
-	 */
-	protected $object;
-
-	/**
-	 * Sets up the fixture, for example, opens a network connection.
-	 * This method is called before a test is executed.
-	 */
-	protected function setUp()
-	{
-		$this->file = $file = tempnam(sys_get_temp_dir(), 'view');
-		file_put_contents($file, '<?php echo $fairy; ?>');
-		$pixie = $this->getMock("\\PHPixie\\Pixie", array('find_file'));
-		$pixie->expects($this->once())
-                 ->method('find_file')
-                 ->will($this->returnValue($this->file));
-		$this->object = new \PHPixie\View($pixie, 'view');
-	}
-
-	/**
-	 * @covers View::__set and View::__get
-	 */
-	public function test__set()
-	{
-		// Remove the following lines when you implement this test.
-		$this->object->fairy = 'Tinkerbell';
-		$this->assertEquals($this->object->fairy, 'Tinkerbell');
-	}
-
-	/**
-	 * @covers View::render
-	 */
-	public function testRender()
-	{
-
-		$this->object->fairy = 'Tinkerbell';
-		$out = $this->object->render();
-		$this->assertEquals('Tinkerbell', $out);
-	}
-	
-	public function tearDown(){
-		unlink($this->file);
-	}
-
-}

+ 0 - 4
frameworks/PHP/phpixie/vendor/phpixie/db/README.md

@@ -1,4 +0,0 @@
-PHPixie-DB
-==========
-
-Database Drivers for PHPixie

+ 0 - 129
frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB.php

@@ -1,129 +0,0 @@
-<?php
-
-namespace PHPixie;
-
-/**
- * Database Module for PHPixie
- *
- * This module allows you to access the database. Currently
- * PDO and Mysqli drivers are supported. PDO drivers can access Mysql, 
- * SQLite and PostgreSQL databases.
- *
- * @see \PHPixie\DB\Query
- * @package    DB
- */
-class DB {
-	
-	/**
-	 * Pixie Dependancy Container
-	 * @var \PHPixie\Pixie
-	 */
-	public $pixie;
-	
-	/**
-	 * Database connection instances
-	 * @var \PHPixie\DB\Connection
-	 */
-	protected $db_instances = array();
-	
-	/**
-	 * Initializes the database module
-	 * 
-	 * @param \PHPixie\Pixie $pixie Pixie dependency container
-	 */
-	public function __construct($pixie) {
-		$this->pixie = $pixie;
-	}
-	
-	/**
-	 * Gets an instance of a connection to the database
-	 *
-	 * @param string  $config Configuration name of the connection.
-	 *                        Defaults to  'default'.
-	 * @return \PHPixie\DB\Connection  Driver implementation of the Connection class.
-	 */
-	public function get($config = 'default'){
-		if (!isset($this->db_instances[$config])) {
-			$driver = $this->pixie->config->get("db.{$config}.driver");
-			$driver = "\\PHPixie\\DB\\".$driver."\\Connection";
-			$this->db_instances[$config] = new $driver($this->pixie, $config);
-		}
-		return $this->db_instances[$config];
-	}
-	
-	/**
-	 * Builds a query for specified connection.
-	 *
-	 * @param string $type   Query type. Available types: select,update,insert,delete,count
-	 * @param string  $config Configuration name of the connection.
-	 *                        Defaults to  'default'.
-	 * @return \PHPixie\DB\Query  Driver implementation of the Query class.
-	 */
-	public function query($type, $config = 'default')
-	{
-		return $this->get($config)->query($type);
-	}
-
-	/**
-	 * Gets the id of the last inserted row
-	 *
-	 * @param string  $config Configuration name of the connection.
-	 *                        Defaults to  'default'.
-	 * @return mixed Id of the last inserted row
-	 */
-	public function insert_id($config = 'default')
-	{
-		return $this->get($config)->insert_id();
-	}
-	
-	/**
-	 * Gets column names for the specified table
-	 *
-	 * @param string $table Name of the table to get columns from
-	 * @param string  $config Configuration name of the connection.
-	 *                        Defaults to  'default'.
-	 * @return array Array of column names
-	 */
-	public function list_columns($table, $config = 'default') {
-		return $this->get($config)->list_columns($table);
-	}
-	
-	/**
-	 * Returns an Expression representation of the value.
-	 * Values wrapped inside Expression are not escaped in queries
-	 *
-	 * @param mixed $value Value to be wrapped
-	 * @return \PHPixie\Db\Expression  Raw value that will not be escaped during query building
-	 */
-	public function expr($value) {
-		return new \PHPixie\DB\Expression($value);
-	}
-	
-	/*
-	 * Creates a new query
-	 *
-	 * @param string $driver Database driver name
-	 * @param \PHPixie\DB\Connection $db   Database connection
-	 * @param string $type Query type. Available types: select, update, insert, delete, count
-	 * @return \PHPixie\DB\Query
-	 */
-	public function query_driver($driver, $db, $type) {
-		$driver = "\\PHPixie\\DB\\".$driver."\\Query";
-		return new $driver($db, $type);
-	}
-	
-	/*
-	 * Creates a new result
-	 *
-	 * @param string $driver Database driver name
-	 * @param object $cursor Datbase result cursor
-	 * @return \PHPixie\DB\Result
-	 */
-	public function result_driver($driver, $cursor) {
-		$driver = "\\PHPixie\\DB\\".$driver."\\Result";
-		return new $driver($cursor);
-	}
-	
-	
-		
-}

+ 0 - 92
frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Connection.php

@@ -1,92 +0,0 @@
-<?php
-
-namespace PHPixie\DB;
-
-/**
- * Database related functions. Creates connections,
- * executes queries and returns results. It is also the
- * generic connection class used by drivers.
- * @package Database
- */
-abstract class Connection
-{
-
-	public $pixie;
-	
-	public function __construct($pixie, $config) {
-		$this->pixie = $pixie;
-	}
-	
-	/**
-	 * Executes a prepared statement query
-	 *
-	 * @param string   $query  A prepared statement query
-	 * @param array     $params Parameters for the query
-	 * @return Result_Database
-	 * @see Result_Database
-	 */
-	public abstract function execute($query, $params = array());
-
-	/**
-	 * Builds a new Query to the database
-	 *
-	 * @param string $type Query type. Available types: select, update, insert, delete, count
-	 * @return Result_Database
-	 * @see Query_Database
-	 */
-	public abstract function query($type);
-
-	/**
-	 * Gets the id of the last inserted row.
-	 *
-	 * @return mixed The id of the last inserted row
-	 */
-	public abstract function insert_id();
-
-	/**
-	 * Gets column names for the specified table
-	 *
-	 * @param string $table Name of the table to get columns from
-	 * @return array Array of column names
-	 */
-	public abstract function list_columns($table);
-
-	/**
-	 * Executes a named query where parameters are passed as an associative array
-	 * Example:
-	 * <code>
-	 * $result=$db->namedQuery("SELECT * FROM fairies where name = :name",array('name'=>'Tinkerbell'));
-	 * </code>
-	 *
-	 * @param string $query  A named query
-	 * @param array   $params Associative array of parameters
-	 * @return Result_Database   Current drivers implementation of Result_Database
-	 */
-	public function named_query($query, $params = array())
-	{
-		$bind = array();
-		preg_match_all('#:(\w+)#is', $query, $matches, PREG_SET_ORDER);
-		foreach ($matches as $match)
-		{
-			if (isset($params[$match[1]]))
-			{
-				$query = preg_replace("#{$match[0]}#", '?', $query, 1);
-				$bind[] = $params[$match[1]];
-			}
-		}
-		return $this->execute($query, $bind);
-	}
-
-	/**
-	 * Returns an Expression representation of the value.
-	 * Values wrapped inside Expression are not escaped in queries
-	 *
-	 * @param mixed $value Value to be wrapped
-	 * @return \PHPixie\Db\Expression  Raw value that will not be escaped during query building
-	 */
-	public function expr($value)
-	{
-		return $this->phpixie->db->expr($value);
-	}
-
-}

+ 0 - 35
frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Expression.php

@@ -1,35 +0,0 @@
-<?php
-
-namespace PHPixie\DB;
-
-/**
- * This class allows you to wrap fields or values that you don't want to be escaped
- * inside the query
- * @package Database
- */
-class Expression
-{
-
-	/**
-	 * Part of query that should not be escaped
-	 * @var mixed
-	 */
-	public $value;
-
-	/**
-	 * Marks a part of query as a database specific expression,
-	 * e.g. calls to SQL functions like MAX(), SUBSTR() etc.
-	 * Example
-	 * <code>
-	 * $q->fields($this->pixie->db->expr('COUNT(*)'));
-	 * </code>
-	 *
-	 * @param mixed $value Part of query that should not be escaped
-	 * @return Expression_Database
-	 */
-	public function __construct($value)
-	{
-		$this->value = $value;
-	}
-
-}

+ 0 - 123
frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Mysql/Connection.php

@@ -1,123 +0,0 @@
-<?php
-
-namespace PHPixie\DB\Mysql;
-
-/**
- * Mysqli Database Implementation
- * @package Database
- */
-class Connection extends \PHPixie\DB\Connection
-{
-	
-	/**
-	 * Mysqli database connection object
-	 * @var mysqli
-	 * @link http://php.net/manual/en/class.mysqli.php
-	 */
-	public $conn;
-
-	/**
-	 * Type of the database, mysql.
-	 * @var string
-	 */
-	public $db_type = 'mysql';
-
-	/**
-	 * Initializes database connection
-	 *
-	 * @param string $config Name of the connection to initialize
-	 * @return void
-	 */
-	public function __construct($pixie, $config)
-	{
-		parent::__construct($pixie, $config);
-		
-		$this->conn = mysqli_connect(
-			$pixie->config->get("db.{$config}.host", 'localhost'),
-			$pixie->config->get("db.{$config}.user", ''),
-			$pixie->config->get("db.{$config}.password", ''),
-			$pixie->config->get("db.{$config}.db")
-		);
-		$this->conn->set_charset("utf8");
-	}
-
-	/**
-	 * Gets column names for the specified table
-	 *
-	 * @param string $table Name of the table to get columns from
-	 * @return array Array of column names
-	 * @throw \Exception if table doesn't exist
-	 */
-	public function list_columns($table)
-	{
-		$columns = array();
-		$table_desc = $this->execute("DESCRIBE `$table`");
-		if (!$table_desc->valid())
-		{
-			throw new \Exception("Table '{$table}' doesn't exist");
-		}
-		foreach ($table_desc as $column)
-		{
-			$columns[] = $column->Field;
-		}
-
-		return $columns;
-	}
-
-	/**
-	 * Builds a new Query implementation
-	 *
-	 * @param string $type Query type. Available types: select,update,insert,delete,count
-	 * @return Query_Mysql_Driver  Returns a Mysqli implementation of a Query.
-	 * @see Query_Database
-	 */
-	public function query($type)
-	{
-		return $this->pixie->db->query_driver('Mysql', $this, $type);
-	}
-
-	/**
-	 * Gets the id of the last inserted row.
-	 *
-	 * @return mixed Row id
-	 */
-	public function insert_id()
-	{
-		return $this->conn->insert_id;
-	}
-
-	/**
-	 * Executes a prepared statement query
-	 *
-	 * @param string   $query  A prepared statement query
-	 * @param array     $params Parameters for the query
-	 * @return Result_Mysql_Driver    Mysqli implementation of a database result
-	 * @throws \Exception If the query resulted in an error
-	 * @see Database_Result
-	 */
-	public function execute($query, $params = array())
-	{
-		$cursor = $this->conn->prepare($query);
-		if (!$cursor)
-			throw new \Exception("Database error: {$this->conn->error} \n in query:\n{$query}");
-		$types = '';
-		$bind = array();
-		$refs = array();
-		if (!empty($params))
-		{
-			foreach ($params as $key => $param)
-			{
-				$refs[$key] = is_array($param) ? $param[0] : $param;
-				$bind[] = &$refs[$key];
-				$types .= is_array($param) ? $param[1] : 's';
-			}
-			array_unshift($bind, $types);
-
-			call_user_func_array(array($cursor, 'bind_param'), $bind);
-		}
-		$cursor->execute();
-		$res = $cursor->get_result();
-		return $this->pixie->db->result_driver('Mysql', $res);
-	}
-
-}

+ 0 - 12
frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Mysql/Query.php

@@ -1,12 +0,0 @@
-<?php
-
-namespace PHPixie\DB\Mysql;
-
-/**
- * Mysqli implementation of the database Query
- * @package Database
- */
-class Query extends \PHPixie\DB\PDO\Query
-{
-
-}

+ 0 - 57
frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Mysql/Result.php

@@ -1,57 +0,0 @@
-<?php
-
-namespace PHPixie\DB\Mysql;
-
-/**
- * Database result implementation for Mysqli
- * @package Database
- */
-class Result extends \PHPixie\DB\Result
-{
-
-	/**
-	 * Initializes new result object
-	 *
-	 * @param mysqli_result $result Mysqli Result
-	 * @return void
-	 * @link http://php.net/manual/en/class.mysqli-result.php
-	 */
-	public function __construct($result)
-	{
-		$this->_result = $result;
-	}
-
-	/**
-	 * Throws exception if rewind is attempted.
-	 *
-	 * @return void
-	 * @throws \Exception If rewind is attempted
-	 */
-	public function rewind()
-	{
-		if ($this->_position > 0)
-		{
-			throw new \Exception('Mysqli result cannot be rewound for unbuffered queries.');
-		}
-	}
-
-	/**
-	 * Iterates to the next row in the result set
-	 *
-	 * @return void
-	 */
-	public function next()
-	{
-		$this->check_fetched();
-		$this->_row = $this->_result->fetch_object();
-		if ($this->_row)
-		{
-			$this->_position++;
-		}
-		else
-		{
-			$this->_result->free();
-		}
-	}
-
-}

+ 0 - 132
frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/PDO/Connection.php

@@ -1,132 +0,0 @@
-<?php
-
-namespace PHPixie\DB\PDO;
-
-/**
- * PDO Database implementation.
- * @package Database
- */
-class Connection extends \PHPixie\DB\Connection
-{
-
-	public $pixie;
-	
-	/**
-	 * Connection object
-	 * @var PDO
-	 * @link http://php.net/manual/en/class.pdo.php
-	 */
-	public $conn;
-
-	/**
-	 * Type of the database, e.g. mysql, pgsql etc.
-	 * @var string
-	 */
-	public $db_type;
-
-	/**
-	 * Initializes database connection
-	 *
-	 * @param string $config Name of the connection to initialize
-	 * @return void
-	 */
-	public function __construct($pixie, $config)
-	{
-		parent::__construct($pixie, $config);
-		
-		$this->conn = new \PDO(
-			$pixie->config->get("db.{$config}.connection"),
-			$pixie->config->get("db.{$config}.user", ''),
-			$pixie->config->get("db.{$config}.password", '')
-		);
-		$this->conn->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
-		$this->db_type = strtolower(str_replace('PDO_', '', $this->conn->getAttribute(\PDO::ATTR_DRIVER_NAME)));
-		if ($this->db_type != 'sqlite')
-		{
-			$this->conn->exec("SET NAMES utf8");
-		}
-	}
-
-	/**
-	 * Builds a new Query implementation
-	 *
-	 * @param string $type Query type. Available types: select,update,insert,delete,count
-	 * @return Query_PDO_Driver  Returns a PDO implementation of a Query.
-	 * @see Query_Database
-	 */
-	public function query($type)
-	{
-		return $this->pixie->db->query_driver('PDO', $this, $type);
-	}
-
-	/**
-	 * Gets the id of the last inserted row.
-	 *
-	 * @return mixed Row id
-	 */
-	public function insert_id()
-	{
-		if ($this->db_type == 'pgsql')
-		{
-			return $this->execute('SELECT lastval() as id')->current()->id;
-		}
-		return $this->conn->lastInsertId();
-	}
-
-	/**
-	 * Gets column names for the specified table
-	 *
-	 * @param string $table Name of the table to get columns from
-	 * @return array Array of column names
-	 */
-	public function list_columns($table)
-	{
-		$columns = array();
-		if ($this->db_type == 'mysql')
-		{
-			$table_desc = $this->execute("DESCRIBE `$table`");
-			foreach ($table_desc as $column)
-			{
-				$columns[] = $column->Field;
-			}
-		}
-		if ($this->db_type == 'pgsql')
-		{
-			$table_desc = $this->execute("select column_name from information_schema.columns where table_name = '{$table}' and table_catalog=current_database();");
-			foreach ($table_desc as $column)
-			{
-				$columns[] = $column->column_name;
-			}
-		}
-		if ($this->db_type == 'sqlite')
-		{
-			$table_desc = $this->execute("PRAGMA table_info('$table')");
-			foreach ($table_desc as $column)
-			{
-				$columns[] = $column->name;
-			}
-		}
-		return $columns;
-	}
-
-	/**
-	 * Executes a prepared statement query
-	 *
-	 * @param string   $query  A prepared statement query
-	 * @param array     $params Parameters for the query
-	 * @return Result_PDO_Driver    PDO implementation of a database result
-	 * @throws \Exception If the query resulted in an error
-	 * @see Database_Result
-	 */
-	public function execute($query, $params = array())
-	{
-		$cursor = $this->conn->prepare($query);
-		if (!$cursor->execute($params))
-		{
-			$error = $cursor->errorInfo();
-			throw new Exception("Database error:\n".$error[2]." \n in query:\n{$query}");
-		}
-		return $this->pixie->db->result_driver('PDO', $cursor);
-	}
-
-}

+ 0 - 396
frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/PDO/Query.php

@@ -1,396 +0,0 @@
-<?php
-
-namespace PHPixie\DB\PDO;
-
-/**
- * PDO implementation of the database Query
- * @package Database
- */
-class Query extends \PHPixie\DB\Query
-{
-
-	/**
-	 * Type of the database, e.g. mysql, pgsql etc.
-	 * @var string
-	 */
-	protected $_db_type;
-
-	/**
-	 * Character to use for quoting fields
-	 * @var string
-	 */
-	protected $_quote;
-
-	/**
-	 * Creates a new query object, checks which driver we are using and set the character used for quoting
-	 *
-	 * @param DB $db   Database connection
-	 * @param string $type Query type. Available types: select, update, insert, delete, count
-	 * @return void
-	 * @see \PHPixie\DB\Query::__construct()
-	 */
-	public function __construct($db, $type)
-	{
-		parent::__construct($db, $type);
-		$this->_db_type = $this->_db->db_type;
-		$this->_quote = $this->_db_type == 'mysql' ? '`' : '"';
-	}
-
-	/**
-	 * Puts quotes around a string
-	 *
-	 * @param string $str     String to be enclosed in quotes
-	 * @return string  String surrounded with quotes
-	 */
-	protected function quote($str)
-	{
-		return $this->_quote.$str.$this->_quote;
-	}
-
-	/**
-	 * If a string is passed escapes a field by enclosing it in specified quotes.
-	 * If you pass an \PHPixie\DB\Expression object the value will be inserted into the query unescaped
-	 *
-	 * @param mixed $field     Field to be escaped or an \PHPixie\DB\Expression object
-	 *                         if the field must not be escaped
-	 * @return string  Escaped field representation
-	 * @see \PHPixie\DB\Expression
-	 */
-	public function escape_field($field)
-	{
-		if (is_object($field) && $field instanceof \PHPixie\DB\Expression)
-		{
-			return $field->value;
-		}
-		$field = explode('.', $field);
-		if (count($field) == 1)
-		{
-			array_unshift($field, $this->last_alias());
-		}
-		$str = $this->quote($field[0]).'.';
-		if (trim($field[1]) == '*')
-		{
-			return $str.'*';
-		}
-		return $str.$this->quote($field[1]);
-	}
-
-	/**
-	 * Replaces the value with ? and appends it to the parameters array
-	 * If you pass an \PHPixie\DB\Expression object the value will be inserted into the query unescaped
-	 * @param mixed $val     Value to be escaped or an \PHPixie\DB\Expression object
-	 *                       if the value must not be escaped
-	 * @param array  &$params Reference to parameters array
-	 * @return string  Escaped value representation
-	 */
-	public function escape_value($val, &$params)
-	{
-		if ($val instanceof \PHPixie\DB\Expression)
-		{
-			return $val->value;
-		}
-		if ($val instanceof \PHPixie\DB\Query)
-		{
-			return $this->subquery($val, $params);
-		}
-		$params[] = $val;
-		return '?';
-	}
-
-	/**
-	 * Gets the SQL for a subquery and appends its parameters to current ones
-	 *
-	 * @param \PHPixie\DB\Query $query Query builder for the subquery
-	 * @param array  &$params Reference to parameters array
-	 * @return string  Subquery SQL
-	 */
-	protected function subquery($query, &$params)
-	{
-		$query = $query->query();
-		$params = array_merge($params, $query[1]);
-		return "({$query[0]}) ";
-	}
-
-	/**
-	 * Gets the SQL for a table to select from
-	 *
-	 * @param string|\PHPixie\DB\Expression|\PHPixie\DB\Query|array $table Table representation
-	 * @param array  &$params Reference to parameters array
-	 * @param string &alias   Alias for this table
-	 * @return string  Table SQL
-	 */
-	public function escape_table($table, &$params)
-	{
-		$alias = null;
-		if (is_array($table))
-		{
-			$alias = $table[1];
-			$table = $table[0];
-		}
-
-		if (is_string($table))
-		{
-			$table = $this->quote($table);
-			if ($alias != null)
-				$table.= " AS {$alias}";
-			return $table;
-		}
-
-		if ($alias == null)
-			$alias = $this->last_alias();
-
-		if ($table instanceof \PHPixie\DB\Query)
-			return "{$this->subquery($table, $params)} AS {$alias}";
-
-		if ($table instanceof \PHPixie\DB\Expression)
-			return "({$table->value}) AS {$alias}";
-
-		throw new \Exception("Parameter type ".get_class($table)." cannot be used as a table");
-	}
-
-	/**
-	 * Builds a query and fills the $params array with parameter values
-	 *
-	 * @return array     An array with a prepared query string and an array of parameters
-	 */
-	public function query()
-	{
-
-		$query = '';
-		$params = array();
-
-		if ($this->_type == 'insert')
-		{
-			$query .= "INSERT INTO {$this->quote($this->_table)} ";
-			if (empty($this->_data) && $this->_db_type == 'pgsql')
-			{
-				$query.= "DEFAULT VALUES ";
-			}
-			else
-			{
-				$columns = '';
-				$values = '';
-				$first = true;
-				foreach ($this->_data as $key => $val)
-				{
-					if (!$first)
-					{
-						$values .= ', ';
-						$columns .= ', ';
-					}
-					else
-					{
-						$first = false;
-					}
-					$columns .= $this->quote($key);
-					$values .= $this->escape_value($val, $params);
-				}
-				$query .= "({$columns}) VALUES({$values})";
-			}
-		}
-		else
-		{
-			if ($this->_type == 'select')
-			{
-				$query .= "SELECT ";
-				if ($this->_fields == null)
-				{
-					$query .= "* ";
-				}
-				else
-				{
-					$first = true;
-					foreach ($this->_fields as $f)
-					{
-						if (!$first)
-						{
-							$query .= ", ";
-						}
-						else
-						{
-							$first = false;
-						}
-						if (is_array($f))
-						{
-							$query .= "{$this->escape_field($f[0])} AS {$f[1]} ";
-						}
-						else
-						{
-							$query .= "{$this->escape_field($f)} ";
-						}
-					}
-				}
-				if(!empty($this->_table))
-					$query .= "FROM {$this->escape_table($this->_table, $params)} ";
-			}
-			if ($this->_type == 'count')
-			{
-				$query .= "SELECT COUNT(*) as {$this->quote('count')} FROM {$this->escape_table($this->_table, $params)} ";
-			}
-
-			if ($this->_type == 'delete')
-			{
-				if ($this->_db_type != 'sqlite')
-				{
-					$query .= "DELETE {$this->last_alias()}.* FROM {$this->quote($this->_table)} ";
-				}
-				else
-				{
-					if (!empty($this->_joins))
-					{
-						throw new \Exception("SQLite doesn't support deleting a table with JOIN in the query");
-					}
-					$query .= "DELETE FROM {$this->quote($this->_table)} ";
-				}
-			}
-			if ($this->_type == 'update')
-			{
-				$query .= "UPDATE {$this->quote($this->_table)} SET ";
-				$first = true;
-				foreach ($this->_data as $key => $val)
-				{
-					if (!$first)
-					{
-						$query.=", ";
-					}
-					else
-					{
-						$first = false;
-					}
-					$query .= "{$this->quote($key)} = {$this->escape_value($val, $params)}";
-				}
-				$query .= " ";
-			}
-
-			foreach ($this->_joins as $join)
-			{
-				$table = $join[0];
-				$table = $this->escape_table($table, $params);
-				$query .= strtoupper($join[1])." JOIN {$table} ";
-				if(!empty($join[2]))
-					$query.="ON {$this->get_condition_query($join[2], $params, true, true)} ";
-			}
-
-			if (!empty($this->_conditions))
-			{
-				$query .= "WHERE {$this->get_condition_query($this->_conditions, $params, true)} ";
-			}
-			if (($this->_type == 'select' || $this->_type == 'count') && $this->_group_by != null)
-			{
-				$query .= "GROUP BY {$this->escape_field($this->_group_by)} ";
-			}
-			if (($this->_type == 'select' || $this->_type == 'count') && !empty($this->_having))
-			{
-				$query .= "HAVING {$this->get_condition_query($this->_having, $params, true)} ";
-			}
-
-			if ($this->_type == 'select' && !empty($this->_order_by))
-			{
-				$query .= "ORDER BY ";
-				$first = true;
-				foreach ($this->_order_by as $order)
-				{
-					if (!$first)
-					{
-						$query .= ',';
-					}
-					else
-					{
-						$first = false;
-					}
-					$query .= $this->escape_field($order[0])." ";
-					if (isset($order[1]))
-					{
-						$dir = strtoupper($order[1]);
-						$query .= $dir." ";
-					}
-				}
-			}
-
-			if (count($this->_union) > 0 && ($this->_type == 'select'))
-			{
-				$query = "({$query}) ";
-				foreach ($this->_union as $union)
-				{
-					$query .= $union[1] ? "UNION ALL " : "UNION ";
-					if ($union[0] instanceof \PHPixie\DB\Query)
-					{
-						$query .= $this->subquery($union[0], $params);
-					}
-					elseif ($union[0] instanceof \PHPixie\DB\Expression)
-					{
-						$query .= "({$union[0]->value}) ";
-					}
-					else
-					{
-						throw new \Exception("You can only use query builder instances or \$pixie->db->expr() for unions");
-					}
-				}
-			}
-
-			if ($this->_type != 'count')
-			{
-				if ($this->_limit != null)
-				{
-					$query .= "LIMIT {$this->_limit} ";
-				}
-				if ($this->_offset != null)
-				{
-					$query .= "OFFSET {$this->_offset} ";
-				}
-			}
-		}
-
-		return array($query, $params);
-	}
-
-	/**
-	 * Recursively parses conditions array into a query string
-	 *
-	 * @param array     $p                   Element of the cobditions array
-	 * @param array   &$params             Reference to parameters array
-	 * @param boolean   $skip_first_operator Flag to skip the first logical operator in a query
-	 *                                       to prevent AND or OR to be at the beginning of the query
-	 * @param boolean   $value_is_field      Flag if the the value in the logical operations should
-	 *                                       be treated as a field. E.g. for joins where the fields are
-	 *                                       compared between themselves and not with actual values
-	 * @return string     String representation of the conditions
-	 * @throws \Exception If condition cannot be parsed
-	 */
-	public function get_condition_query($p, &$params, $skip_first_operator, $value_is_field = false)
-	{
-		if (isset($p['field']))
-		{
-			if ($value_is_field)
-			{
-				$param = $this->escape_field($p['value']);
-			}
-			else
-			{
-				$param = $this->escape_value($p['value'], $params);
-			}
-			return $this->escape_field($p['field']).' '.$p['operator'].' '.$param;
-		}
-		if (isset($p['logic']))
-		{
-			return ($skip_first_operator ? '' : strtoupper($p['logic']).' ')
-				.$this->get_condition_query($p['conditions'], $params, false, $value_is_field);
-		}
-
-		$conds = '';
-		$skip = $skip_first_operator || (count($p) > 1);
-		foreach ($p as $q)
-		{
-			$conds .= $this->get_condition_query($q, $params, $skip, $value_is_field).' ';
-			$skip = false;
-		}
-		if (count($p) > 1 && !$skip_first_operator)
-		{
-			return "( ".$conds.")";
-		}
-		return $conds;
-
-		throw new \Exception("Cannot parse condition:\n".var_export($p, true));
-	}
-
-}

+ 0 - 57
frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/PDO/Result.php

@@ -1,57 +0,0 @@
-<?php
-
-namespace PHPixie\DB\PDO;
-
-/**
- * Database result implementation for PDO
- * @package Database
- */
-class Result extends \PHPixie\DB\Result
-{
-
-	/**
-	 * Initializes new result object
-	 *
-	 * @param PDOStatement $stmt PDO Statement
-	 * @return void
-	 * @link http://php.net/manual/en/class.pdostatement.php
-	 */
-	public function __construct($stmt)
-	{
-		$this->_result = $stmt;
-	}
-
-	/**
-	 * Throws exception if rewind is attempted.
-	 *
-	 * @return void
-	 * @throws \Exception If rewind is attempted
-	 */
-	public function rewind()
-	{
-		if ($this->_position > 0)
-		{
-			throw new \Exception('PDO statement cannot be rewound for unbuffered queries');
-		}
-	}
-
-	/**
-	 * Iterates to the next row in the result set
-	 *
-	 * @return void
-	 */
-	public function next()
-	{
-		$this->check_fetched();
-		$this->_row = $this->_result->fetchObject();
-		if ($this->_row)
-		{
-			$this->_position++;
-		}
-		else
-		{
-			$this->_result->closeCursor();
-		}
-	}
-
-}

+ 0 - 448
frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Query.php

@@ -1,448 +0,0 @@
-<?php
-
-namespace PHPixie\DB;
-
-/**
- * Query builder. It allows building queries by using methods to set specific query parameters.
- * Database drivers extend this class so that they can generate database specific queries.
- * The idea is to provide a database agnostic interface to query writing.
- *
- * @method mixed table(string $table = null) Set table to query.
- *               Without arguments returns current table, returns self otherwise.
- *
- * @method mixed data(array $data = null) Set data for insert or update queries.
- *               Without arguments returns current data, returns self otherwise.
- *
- * @method mixed limit(int $limit = null) Set number of rows to return. If NULL is passed than no limit is used.
- *               If NULL is passed than no limit is used.
- *               Without arguments returns current limit, returns self otherwise.
- *
- * @method mixed offset(string $offset = null) Set the offset for the first row in result.
- *               If NULL is passed than no offset is used.
- *               Without arguments returns current offset, returns self otherwise.
- *
- * @method mixed group_by(string $group_by = null) A column to group rows by for aggregator functions.
- *               If NULL is passed than no grouping is done.
- *               Without arguments returns current group_by argument, returns self otherwise.
- *
- * @method mixed type(string $type = null) Set query type. Available types: select, update, insert, delete, count.
- *               Without arguments returns current type argument, returns self otherwise.
- * @package Database
- */
-
-abstract class Query
-{
-
-	/**
-	 * Array of conditions that rows must meet
-	 * @var array
-	 */
-	protected $_conditions = array();
-
-	/**
-	 * Table to query
-	 * @var unknown
-	 */
-	protected $_table;
-
-	/**
-	 * Fields to return in the query
-	 * @var array
-	 */
-	protected $_fields;
-
-	/**
-	 * Data for row insertion or update
-	 * @var unknown
-	 */
-	protected $_data;
-
-	/**
-	 * Query type. Available types: select, update, insert, delete, count
-	 * @var string
-	 */
-	protected $_type;
-
-	/**
-	 * Parameters for tables to join
-	 * @var array
-	 */
-	protected $_joins = array();
-
-	/**
-	 * Number of rows to return
-	 * @var int
-	 */
-	protected $_limit;
-
-	/**
-	 * Offset of the first row
-	 * @var int
-	 */
-	protected $_offset;
-
-	/**
-	 * Columns and directions to order by
-	 * @var array
-	 */
-	protected $_order_by = array();
-
-	/**
-	 * Database connection
-	 * @var DB
-	 */
-	protected $_db;
-
-	/**
-	 * Conditions for aggregator functions
-	 * @var array
-	 */
-	protected $_having = array();
-
-	/**
-	 * Column to group by for aggregator functions
-	 * @var string
-	 */
-	protected $_group_by;
-
-	/**
-	 * Last alias used on the table
-	 * @var string
-	 */
-	protected $_alias = null;
-
-	/**
-	 * Methods and type of value they allow that are available via __call
-	 * @var array
-	 */
-	protected $methods = array('data' => 'array', 'limit' => array('integer', 'NULL'), 'offset' => array('integer', 'NULL'), 'group_by' => array('string', 'NULL'), 'type' => 'string');
-
-	/**
-	 * UNION queries
-	 * @var array
-	 */
-	protected $_union = array();
-
-	/**
-	 * Generates a query in format that can be executed on current database implementation
-	 *
-	 */
-	public abstract function query();
-
-	/**
-	 * Creates a new query
-	 *
-	 * @param DB $db   Database connection
-	 * @param string $type Query type. Available types: select, update, insert, delete, count
-	 * @return void
-	 */
-	public function __construct($db, $type)
-	{
-		$this->_db = $db;
-		$this->_type = $type;
-	}
-
-	/**
-	 * Sets fields to be queried from the database. You can add aliases to the fields
-	 * by passing them as:
-	 *
-	 * array('field_name','alias')
-	 *
-	 * Example: $query->fields('id', array('name', 'fairy_name'))
-	 *
-	 * @param mixed   $field,...   Fields to be selected from the table
-	 * @return mixed  If no parameters are passed returns current array of fields,
-	 *                otherwise returns self.
-	 */
-	public function fields()
-	{
-		$p = func_get_args();
-		if (empty($p))
-		{
-			return $this->_fields;
-		}
-		else
-		{
-			$this->_fields = $p;
-		}
-		return $this;
-	}
-
-	/**
-	 * Sets the table to perform operations on, also supports subqueries
-	 *
-	 * @param string|Query_database|Expression_database $table table to select from
-	 * @param string $alias Alias for this table
-	 * @return mixed Returns self if a table is passed, otherwise returns the table
-	 */
-	public function table($table = null, $alias = null)
-	{
-		if ($table == null)
-		{
-			return is_array($this->_table) ? $this->_table[1] : $this->_table;
-		}
-
-		if (!is_string($table) && $alias == null)
-		{
-
-			$alias = $this->add_alias();
-		}
-		$this->_table = $alias == null ? $table : array($table, $alias);
-
-		return $this;
-	}
-
-	/**
-	 * Magic methods to create methods for all generic query parts
-	 *
-	 * @param string    $method Name of the method to call
-	 * @param array     $args   Array of parameters
-	 * @return mixed    If no arguments are passed returns the current value of the property,
-	 *                  otherwise returns self.
-	 * @throws \Exception If method doesn't exist
-	 * @throws \Exception If value is of incorrect type
-	 * @see $methods
-	 */
-
-	public function __call($method, $args)
-	{
-		if (isset($this->methods[$method]))
-		{
-			$property = '_'.$method;
-
-			if (empty($args))
-			{
-				return $this->$property;
-			}
-			$val = $args[0];
-			if (is_numeric($val))
-			{
-				$val = (int) $val;
-			}
-			$allowed_types = $this->methods[$method];
-			if (!is_array($allowed_types))
-			{
-				$allowed_types = array($allowed_types);
-			}
-			if (!in_array(gettype($val), $allowed_types))
-			{
-				throw new \Exception("Method '{$method}' only accepts values of type: ".implode(' or ', $allowed_types).", '{$val}' was passed");
-			}
-			$this->$property = $val;
-			return $this;
-		}
-		throw new \Exception("Method '{$method}' doesn't exist.");
-	}
-
-	/**
-	 * Executes the query
-	 *
-	 * @return object Executes current query on its database connection
-	 * @see DB
-	 */
-	public function execute()
-	{
-		$query = $this->query();
-		$result = $this->_db->execute($query[0], $query[1]);
-		if ($this->_type == 'count')
-		{
-			return $result->get('count');
-		}
-		return $result;
-	}
-
-	/**
-	 * Adds a joined table to the query.
-	 *
-	 * @param string $table Table to join
-	 * @param array $conds Conditions to join tables on, same behavior as with where() method
-	 * @param string  $type  Type of join. Defaults to 'left'
-	 * @return Query_Database   Returns self
-	 * @see where()
-	 */
-	public function join($table, $conds, $type = 'left')
-	{
-		$this->_joins[] = array($table, $type, $this->get_condition_part($conds));
-		return $this;
-	}
-
-	/**
-	 * Sets conditions for aggregate functions, same behavior as with where() method
-	 *
-	 * @return Query_Database Returns self
-	 * @see where()
-	 */
-	public function having()
-	{
-		$p = func_get_args();
-		$cond = $this->get_condition_part($p);
-		$this->_having = array_merge($this->_having, array($cond));
-		return $this;
-	}
-
-	/**
-	 * Adds a column to ordering parameters.
-	 *
-	 * @param string $column Column to order by
-	 * @param string $dir Ordering direction.
-	 * @return Query_Database  Returns self
-	 * @throws \Exception If ordering direction isn't DESC or ASC
-	 */
-	public function order_by($column, $dir = 'ASC')
-	{
-		$dir = strtoupper($dir);
-		if ($dir != 'DESC' && $dir != 'ASC')
-		{
-			throw new \Exception("Invalid sorting direction {$dir} specified");
-		}
-		$this->_order_by[] = array($column, $dir);
-		return $this;
-	}
-
-	/**
-	 * Sets conditions for the query.
-	 * Can be called in many ways, examples:
-	 * Shorthand equals condition:
-	 * <code>
-	 * $q->where('name', 'Tinkerbell')
-	 * </code>
-	 * Conditions with operator:
-	 * <code>
-	 * $q->where('id', '>', 3)
-	 * </code>
-	 * OR logic:
-	 * <code>
-	 * $q->where('or', array('name', 'Tinkerbell'))
-	 * </code>
-	 * OR logic with operator
-	 * <code>
-	 * ->where('or', array('id', '>', 3))
-	 * </code>
-	 * Arrays represent brackets. e.g
-	 * <code>
-	 * $q->where('name', 'Tinkerbell')
-	 *   ->where('or', array(
-	 *        array('id', '>', 7),
-	 *        array('id', '<', 15)
-	 *   );
-	 * //Will produce "WHERE `name`='Tinkerbell' OR (`id` > 7 AND `id` < 15)"
-	 * </code>
-	 * Multiple calls to where() append new conditions to previous ones
-	 *
-	 * @param mixed $column Column name, logic parameter 'OR' or 'AND' or an array of conditions
-	 * @param mixed $operator Condition value, operator or an array of parameters
-	 * @param mixed $val Condition value
-	 *
-	 * @return Query_Database  Returns self
-	 */
-	public function where()
-	{
-		$p = func_get_args();
-		$cond = $this->get_condition_part($p);
-		$this->_conditions = array_merge($this->_conditions, array($cond));
-
-		return $this;
-	}
-
-	/**
-	 * Recursively builds condition arrays for methods like where(), having()
-	 *
-	 * @param array     $p Parameters passed to the method
-	 * @return array     Array in condition format
-	 * @throws \Exception If condition format is incorrect
-	 */
-	private function get_condition_part($p)
-	{
-		if (is_string($p[0]) && (strtolower($p[0]) == 'or' || strtolower($p[0]) == 'and') && isset($p[1]) && is_array($p[1]))
-		{
-			$cond = $this->get_condition_part($p[1]);
-			$cond['logic'] = strtolower($p[0]);
-			return $cond;
-		}
-
-		if (is_array($p[0]))
-		{
-			if (count($p) == 1)
-			{
-				return $this->get_condition_part($p[0]);
-			}
-			$conds = array();
-			foreach ($p as $q)
-			{
-				$conds[] = $this->get_condition_part($q);
-			}
-			if (count($conds) == 1)
-			{
-				return $conds;
-			}
-			return array('logic' => 'and', 'conditions' => $conds);
-		}
-
-		if ((is_string($p[0]) || $p[0] instanceof \PHPixie\DB\Expression) && isset($p[1]))
-		{
-			if (is_string($p[0]) && strpos($p[0], '.') === false)
-			{
-				$p[0] = $this->last_alias().'.'.$p[0];
-			}
-			return array(
-				'logic' => 'and',
-				'conditions' => array(
-					'field' => $p[0],
-					'operator' => isset($p[2]) ? $p[1] : '=',
-					'value' => isset($p[2]) ? $p[2] : $p[1]
-				)
-			);
-		}
-
-		throw new \Exception('Incorrect conditional statement passed');
-	}
-
-	/**
-	 * Adds a UNION to the query
-	 * 
-	 * @param  Query_Database|Expression_Database  $query Query for the UNION
-	 * @param  string $all whether to do a UNION ALL, e.g. keep duplicate rows
-	 * @return Query_Database  Returns self
-	 */
-	public function union($query,$all=true) {
-		$this->_union[] = array($query,$all);
-		return $this;
-	}
-	
-	/**
-	 * Gets last generated alias
-	 *
-	 * @return string  Last generated alias. If no alias were created returns table name.
-	 */
-	public function last_alias()
-	{
-		if ($this->_alias === null)
-		{
-			if (is_array($this->_table))
-				return $this->_table[1];
-
-			return $this->_table;
-		}
-		return 'a'.$this->_alias;
-	}
-
-	/**
-	 * Generates new alias. Useful for dynamically adding aliases to joins.
-	 * Alias is just a letter 'a' with an incremented number.
-	 *
-	 * @return string New alias
-	 */
-	public function add_alias()
-	{
-		if ($this->_alias === null)
-		{
-			$this->_alias = 0;
-		}
-		else
-		{
-			$this->_alias++;
-		}
-		return $this->last_alias();
-	}
-
-}

+ 0 - 113
frameworks/PHP/phpixie/vendor/phpixie/db/classes/PHPixie/DB/Result.php

@@ -1,113 +0,0 @@
-<?php
-
-namespace PHPixie\DB;
-
-/**
- * Allows to access database results in a unified way and
- * provides iterator support, so it can be used inside loops like 'foreach'
- * @package Database
- */
-abstract class Result implements \Iterator
-{
-
-	/**
-	 * Current row number
-	 * @var integer
-	 */
-	protected $_position = -1;
-
-	/**
-	 * Database result object
-	 * @var mixed
-	 */
-	protected $_result;
-
-	/**
-	 * Current row
-	 * @var object
-	 */
-	protected $_row;
-
-	/**
-	 * If at least one row has been fetched
-	 * @var object
-	 */
-	protected $_fetched = false;
-
-	/**
-	 * Returns current row
-	 *
-	 * @return object Current row in result set
-	 */
-	public function current()
-	{
-		$this->check_fetched();
-		return $this->_row;
-	}
-
-	/**
-	 * Gets the number of the current row
-	 *
-	 * @return integer Row number
-	 */
-	public function key()
-	{
-		$this->check_fetched();
-		return $this->_position;
-	}
-
-	/**
-	 * Check if current row exists.
-	 *
-	 * @return bool True if row exists
-	 */
-	public function valid()
-	{
-		$this->check_fetched();
-		return $this->_row != null;
-	}
-
-	/**
-	 * Returns all rows as array
-	 *
-	 * @return array  Array of rows
-	 */
-	public function as_array()
-	{
-		$arr = array();
-		foreach ($this as $row)
-		{
-			$arr[] = $row;
-		}
-		return $arr;
-	}
-
-	/**
-	 * Checks if the rows from the result set have
-	 * been fetched at least once. If not fetches first row.
-	 *
-	 */
-	protected function check_fetched()
-	{
-		if (!$this->_fetched)
-		{
-			$this->_fetched = true;
-			$this->next();
-		}
-	}
-
-	/**
-	 * Gets a column from the current row in the set
-	 *
-	 * @param  string $column Column name
-	 * @return mixed  Column value
-	 */
-	public function get($column)
-	{
-		if ($this->valid() && isset($this->_row->$column))
-		{
-			return $this->_row->$column;
-		}
-	}
-
-}

+ 0 - 26
frameworks/PHP/phpixie/vendor/phpixie/db/composer.json

@@ -1,26 +0,0 @@
-{
-    "name": "phpixie/db",
-    "description": "PHPixie Database library",
-    "keywords": ["database", "mysql", "postgresql", "sqlite"],
-    "homepage": "http://phpixie.com",
-    "type": "library",
-    "license": "BSD",
-    "authors": [
-        {
-            "name": "Roman Tsiupa",
-            "email": "[email protected]",
-            "homepage": "http://dracony.org"
-        }
-    ],
-    "require": {
-        "phpixie/core": "2.*@dev"
-    },
-    "autoload": {
-        "psr-0": {"PHPixie": "classes/"}
-    },
-    "extra": {
-        "branch-alias": {
-            "dev-master": "2.x-dev"
-        }
-    }
-}

+ 0 - 10
frameworks/PHP/phpixie/vendor/phpixie/db/tests/bootstrap.php

@@ -1,10 +0,0 @@
-<?php
-if(!defined('INIT')) {	
-	define('ROOT',dirname(dirname(dirname(dirname(dirname(__FILE__))))));
-	$loader = require_once(ROOT.'/vendor/autoload.php');
-	$loader->add('PHPixie', ROOT.'/vendor/phpixie/core/classes/');
-	$loader->add('PHPixie', ROOT.'/vendor/phpixie/db/classes/');
-	$loader->add('PHPixie',ROOT.'/vendor/phpixie/orm/classes/');
-	define('INIT', true);
-}
-	

+ 0 - 81
frameworks/PHP/phpixie/vendor/phpixie/db/tests/db/dbTest.php

@@ -1,81 +0,0 @@
-<?php
-
-
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2013-02-07 at 10:14:10.
- */
-class DB_Test extends PHPUnit_Framework_TestCase
-{
-
-	/**
-	 * @var Expression_Database
-	 */
-	protected $object;
-
-	/**
-	 * Sets up the fixture, for example, opens a network connection.
-	 * This method is called before a test is executed.
-	 */
-	protected function setUp()
-	{
-		
-		$this->db_file = tempnam(sys_get_temp_dir(), 'test.sqlite');
-		$this->conf_file = tempnam(sys_get_temp_dir(), 'test.conf');
-		file_put_contents($this->db_file, '');
-		$db = new PDO('sqlite:'.$this->db_file);
-		$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
-		$db->exec("CREATE TABLE fairies(id INT PRIMARY_KEY,name VARCHAR(255))");
-		$pixie = $this->getMock('\PHPixie\Pixie',array('find_file'));
-		$pixie->expects($this->any())
-                 ->method('find_file')
-                 ->will($this->returnValue($this->conf_file));
-		$pixie->db = $this->getMockBuilder('\PHPixie\DB')
-				->disableOriginalConstructor()
-				->getMock();
-		$pixie->db->expects($this->any())
-                 ->method('query_driver')
-                 ->will($this->returnValue(null));
-		$pixie->config->set('db.default.connection', 'sqlite:'.$this->db_file);
-		$pixie-> config->set('db.default.driver', 'pdo');
-		$this->object = new \PHPixie\DB($pixie);
-		$pixie-> db = $this->object;
-		$db = null;
-	}
-	
-	public function testGet() {
-		$this->object->get()->test = 'same';
-		$this->assertEquals('same', $this->object->get()->test);
-		$this->assertEquals('PHPixie\DB\PDO\Connection', get_class($this->object->get()));
-	}
-	
-	public function testQuery() {
-		$this->assertEquals('PHPixie\DB\PDO\Query', get_class($this->object->query('select')));
-	}
-	
-	public function testInsert_id()
-	{
-		$this->object->get()->execute("INSERT INTO fairies(name)values('Trixie')");
-		$this->assertEquals(1, $this->object->insert_id());
-	}
-
-	public function testList_columns()
-	{
-		$cols = $this->object->list_columns('fairies');
-		$this->assertContains('id', $cols);
-		$this->assertContains('name', $cols);
-	}
-	
-	public function testExpr() {
-		$this->assertEquals('PHPixie\DB\Expression', get_class($this->object->expr("test")));
-	}
-	
-	public function testQuery_driver() {
-		$this->assertEquals('PHPixie\DB\PDO\Query', get_class($this->object->query_driver('pdo',$this->object->get(),'select')));
-	}
-	
-	public function testResult_driver() {
-		$this->assertEquals('PHPixie\DB\PDO\Result', get_class($this->object->result_driver('pdo',null)));
-	}
-	
-	
-}

+ 0 - 41
frameworks/PHP/phpixie/vendor/phpixie/db/tests/db/expressionTest.php

@@ -1,41 +0,0 @@
-<?php
-
-
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2013-02-07 at 10:14:10.
- */
-class Expression_Test extends PHPUnit_Framework_TestCase
-{
-
-	/**
-	 * @var Expression_Database
-	 */
-	protected $object;
-
-	/**
-	 * Sets up the fixture, for example, opens a network connection.
-	 * This method is called before a test is executed.
-	 */
-	protected function setUp()
-	{
-		$this->object = new \PHPixie\DB\Expression('test');
-	}
-
-	/**
-	 * @covers Expression_Database::__construct
-	 */
-	public function testConstruct()
-	{
-		$this->assertEquals('test', $this->object->value);
-	}
-
-	/**
-	 * Tears down the fixture, for example, closes a network connection.
-	 * This method is called after a test is executed.
-	 */
-	protected function tearDown()
-	{
-
-	}
-
-}

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