commit 82063d7bbcb36e6f21db7cd11aac3ed67a29c00f
parent d1f84eb05b6270ca40fd565c1c243de09da12397
Author: Felicitus <felicitus@felicitus.org>
Date: Wed, 22 Jun 2011 07:10:12 +0200
Added initial setup class + check for apc
Diffstat:
2 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/src/de/RaumZeitLabor/PartKeepr/Setup/Setup.php b/src/de/RaumZeitLabor/PartKeepr/Setup/Setup.php
@@ -0,0 +1,20 @@
+<?php
+namespace de\RaumZeitLabor\PartKeepr\Setup;
+
+declare(encoding = 'UTF-8');
+
+class Setup {
+
+ public function run () {
+ $this->testPrequisites();
+ }
+
+ public function testPrequisites () {
+ $this->testAPC();
+ }
+ public function testAPC () {
+ if (!extension_loaded("apc")) {
+ throw new \Exception(PartKeepr::i18n("The extension 'apc' is not loaded. Make sure that it is installed (see http://php.net/manual/en/apc.installation.php) and that it is enabled (set apc.enabled=1 in your php.ini)."));
+ }
+ }
+}+
\ No newline at end of file
diff --git a/testing/SetupDatabase.php b/testing/SetupDatabase.php
@@ -16,6 +16,7 @@ declare(encoding = 'UTF-8');
use de\RaumZeitLabor\PartKeepr\Unit\Unit;
use de\RaumZeitLabor\PartKeepr\SiPrefix\SiPrefix;
+use de\RaumZeitLabor\PartKeepr\Setup\Setup;
declare(encoding = 'UTF-8');
@@ -42,6 +43,8 @@ use de\RaumZeitLabor\PartKeepr\Part\PartManufacturer;
PartKeepr::initialize();
+$setup = new Setup();
+$setup->run();
echo "=)))==========================================\n";
echo "Actions performed by this script:\n";
@@ -65,6 +68,8 @@ if (!($_SERVER["argc"] == 2 && $_SERVER["argv"][1] == "--yes")) {
}
+
+
echo "Performing actions...\n";
@mkdir("../src/Proxies");