diff --git a/.gitignore b/.gitignore index 3d175c15b..f72680670 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ local/config/build.properties local/config/config_db.php local/config/build core/vendor +local/config/runtime-conf.xml diff --git a/core/autoload.php b/core/autoload.php index 91cdc216c..cbc8ad5ca 100644 --- a/core/autoload.php +++ b/core/autoload.php @@ -28,4 +28,20 @@ if(file_exists(__DIR__ . '/vendor/composer/autoload_classmap.php')) $loader->addClassMap($classMap); } +$loader->addClassMap(array( + 'NotORM' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM.php', + 'NotORM_Cache_Session' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM/Cache.php', + 'NotORM_Cache_File' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM/Cache.php', + 'NotORM_Cache_Include' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM/Cache.php', + 'NotORM_Cache_Database' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM/Cache.php', + 'NotORM_Cache_Memcache' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM/Cache.php', + 'NotORM_Cache_APC' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM/Cache.php', + 'NotORM_Literal' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM/Literal.php', + 'NotORM_MultiResult' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM/MultiResult.php', + 'NotORM_Result' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM/Result.php', + 'NotORM_Row' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM/Row.php', + 'NotORM_Structure_Convention' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM/Structure.php', + 'NotORM_Structure_Discovery' => THELIA_ROOT . '/core/vendor/vrana/notorm/NotORM/Structure.php', +)); + $loader->register(); diff --git a/core/bootstrap.php b/core/bootstrap.php index 4260a0f09..20b4f2f0a 100644 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -9,10 +9,10 @@ if (!isset($env)) { * @file * Functions needed for Thelia bootstrap */ - +define('THELIA_ROOT', __DIR__ .'/../'); $loader = require __DIR__ . '/autoload.php'; -define('THELIA_ROOT', __DIR__ .'/../'); + if(file_exists(THELIA_ROOT . '/local/config/config_db.php')) { diff --git a/core/composer.json b/core/composer.json index cba34e8e4..3baea9b25 100644 --- a/core/composer.json +++ b/core/composer.json @@ -7,8 +7,8 @@ "symfony/dependency-injection" : "2.1.*", "symfony/console" : "2.1.*", "symfony/event-dispatcher" : "2.1.*", - "propel/propel1" : "1.6.*", - "symfony-cmf/routing" : "1.0.*@dev" + "symfony-cmf/routing" : "1.0.*@dev", + "vrana/notorm": "dev-master" }, "minimum-stability": "stable" } diff --git a/core/composer.lock b/core/composer.lock index 5ffa72ea2..dca95df05 100644 --- a/core/composer.lock +++ b/core/composer.lock @@ -1,118 +1,6 @@ { - "hash": "6753cff6ae4e98c641837505039c66fd", + "hash": "0f4d3d738985b803a4bf307ef2d7e85c", "packages": [ - { - "name": "phing/phing", - "version": "2.4.14", - "source": { - "type": "git", - "url": "https://github.com/phingofficial/phing", - "reference": "2.4.14" - }, - "dist": { - "type": "zip", - "url": "https://github.com/phingofficial/phing/archive/2.4.14.zip", - "reference": "2.4.14", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "time": "2012-11-29 21:23:47", - "bin": [ - "bin/phing" - ], - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "classes/phing/" - ] - }, - "include-path": [ - "classes" - ], - "license": [ - "LGPL3" - ], - "authors": [ - { - "name": "Michiel Rook", - "email": "mrook@php.net" - }, - { - "name": "Phing Community", - "homepage": "http://www.phing.info/trac/wiki/Development/Contributors" - } - ], - "description": "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.", - "homepage": "http://www.phing.info/", - "keywords": [ - "build", - "task", - "tool" - ] - }, - { - "name": "propel/propel1", - "version": "1.6.7", - "source": { - "type": "git", - "url": "https://github.com/propelorm/Propel", - "reference": "1.6.7" - }, - "dist": { - "type": "zip", - "url": "https://github.com/propelorm/Propel/zipball/1.6.7", - "reference": "1.6.7", - "shasum": "" - }, - "require": { - "php": ">=5.2.4", - "phing/phing": ">=2.4.12,2.4.*" - }, - "time": "2012-07-30 00:58:15", - "bin": [ - "generator/bin/propel-gen", - "generator/bin/propel-gen.bat" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "runtime/lib", - "generator/lib" - ] - }, - "include-path": [ - "runtime/lib", - "generator/lib" - ], - "license": [ - "MIT" - ], - "authors": [ - { - "name": "William Durand", - "email": "william.durand1@gmail.com", - "homepage": "http://www.willdurand.fr" - } - ], - "description": "Propel is an open-source Object-Relational Mapping (ORM) for PHP5.", - "homepage": "http://www.propelorm.org/", - "keywords": [ - "database", - "orm", - "persistence", - "Active Record", - "mapping" - ] - }, { "name": "symfony-cmf/routing", "version": "dev-master", @@ -587,6 +475,40 @@ ], "description": "Symfony Routing Component", "homepage": "http://symfony.com" + }, + { + "name": "vrana/notorm", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/vrana/notorm.git", + "reference": "80131ce82afb8c1ea50868374b8ec8996b770fe3" + }, + "dist": { + "type": "zip", + "url": "https://github.com/vrana/notorm/archive/80131ce82afb8c1ea50868374b8ec8996b770fe3.zip", + "reference": "80131ce82afb8c1ea50868374b8ec8996b770fe3", + "shasum": "" + }, + "time": "2012-09-15 17:29:05", + "type": "library", + "installation-source": "source", + "license": [ + "Apache-2.0", + "GPL-2.0+" + ], + "authors": [ + { + "name": "Jakub Vrána", + "homepage": "http://www.vrana.cz/" + } + ], + "description": "NotORM is a PHP library for simple working with data in the database.", + "homepage": "http://www.notorm.com/", + "keywords": [ + "database", + "dbal" + ] } ], "packages-dev": null, @@ -595,6 +517,7 @@ ], "minimum-stability": "stable", "stability-flags": { - "symfony-cmf/routing": 20 + "symfony-cmf/routing": 20, + "vrana/notorm": 20 } } diff --git a/local/config/container.php b/local/config/container.php deleted file mode 100644 index b74e9dacf..000000000 --- a/local/config/container.php +++ /dev/null @@ -1,18 +0,0 @@ -register('database','Thelia\\Database\\Connection'); - -$container->register('http_kernel','Symfony\\Component\\HttpKernel\\HttpKernel'); - -$container->register('session','Symfony\\Component\\HttpFoundation\\Session\\Session'); - -return $container;