partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit d369a9869347c534c2dc64b917bd6316bf69af3a
parent 23c6a891f7c26f918cef594dd8ebdb28405b3abf
Author: Felicitus <felicitus@felicitus.org>
Date:   Fri, 16 Dec 2011 04:07:57 +0100

Refactored backend structure, moved proxy directory to data/

Diffstat:
Mcronjobs/CreateRSSFeed.php | 2+-
Mcronjobs/CreateStatisticSnapshot.php | 2+-
Mcronjobs/UpdatePartCacheData.php | 2+-
Mcronjobs/UpdateTipsOfTheDay.php | 2+-
Mdoctrine.php | 2+-
Mmigrations.yml | 4++--
Rsrc/de/RaumZeitLabor/PartKeepr/Auth/AuthService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Auth/AuthService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Category/AbstractCategory.php -> src/backend/de/RaumZeitLabor/PartKeepr/Category/AbstractCategory.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Category/AbstractCategoryManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/Category/AbstractCategoryManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Category/AbstractCategoryService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Category/AbstractCategoryService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Category/Exceptions/CategoryNotFoundException.php -> src/backend/de/RaumZeitLabor/PartKeepr/Category/Exceptions/CategoryNotFoundException.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Distributor/Distributor.php -> src/backend/de/RaumZeitLabor/PartKeepr/Distributor/Distributor.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Distributor/DistributorManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/Distributor/DistributorManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Distributor/DistributorService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Distributor/DistributorService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Footprint/Footprint.php -> src/backend/de/RaumZeitLabor/PartKeepr/Footprint/Footprint.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Footprint/FootprintAttachment.php -> src/backend/de/RaumZeitLabor/PartKeepr/Footprint/FootprintAttachment.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Footprint/FootprintImage.php -> src/backend/de/RaumZeitLabor/PartKeepr/Footprint/FootprintImage.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Footprint/FootprintManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/Footprint/FootprintManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Footprint/FootprintService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Footprint/FootprintService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/FootprintAttachment/FootprintAttachmentManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/FootprintAttachment/FootprintAttachmentManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/FootprintAttachment/FootprintAttachmentService.php -> src/backend/de/RaumZeitLabor/PartKeepr/FootprintAttachment/FootprintAttachmentService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/FootprintCategory/FootprintCategory.php -> src/backend/de/RaumZeitLabor/PartKeepr/FootprintCategory/FootprintCategory.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/FootprintCategory/FootprintCategoryManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/FootprintCategory/FootprintCategoryManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/FootprintCategory/FootprintCategoryService.php -> src/backend/de/RaumZeitLabor/PartKeepr/FootprintCategory/FootprintCategoryService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Image/CachedImage.php -> src/backend/de/RaumZeitLabor/PartKeepr/Image/CachedImage.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Image/Exceptions/InvalidImageTypeException.php -> src/backend/de/RaumZeitLabor/PartKeepr/Image/Exceptions/InvalidImageTypeException.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Image/Image.php -> src/backend/de/RaumZeitLabor/PartKeepr/Image/Image.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Manufacturer/Manufacturer.php -> src/backend/de/RaumZeitLabor/PartKeepr/Manufacturer/Manufacturer.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Manufacturer/ManufacturerICLogo.php -> src/backend/de/RaumZeitLabor/PartKeepr/Manufacturer/ManufacturerICLogo.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Manufacturer/ManufacturerManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/Manufacturer/ManufacturerManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Manufacturer/ManufacturerService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Manufacturer/ManufacturerService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/ManufacturerICLogo/ManufacturerICLogoManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/ManufacturerICLogo/ManufacturerICLogoManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/ManufacturerICLogo/ManufacturerICLogoService.php -> src/backend/de/RaumZeitLabor/PartKeepr/ManufacturerICLogo/ManufacturerICLogoService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Part/Part.php -> src/backend/de/RaumZeitLabor/PartKeepr/Part/Part.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Part/PartAttachment.php -> src/backend/de/RaumZeitLabor/PartKeepr/Part/PartAttachment.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Part/PartDistributor.php -> src/backend/de/RaumZeitLabor/PartKeepr/Part/PartDistributor.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Part/PartImage.php -> src/backend/de/RaumZeitLabor/PartKeepr/Part/PartImage.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Part/PartManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/Part/PartManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Part/PartManufacturer.php -> src/backend/de/RaumZeitLabor/PartKeepr/Part/PartManufacturer.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Part/PartService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Part/PartService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Part/PartUnit.php -> src/backend/de/RaumZeitLabor/PartKeepr/Part/PartUnit.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/PartCategory/PartCategory.php -> src/backend/de/RaumZeitLabor/PartKeepr/PartCategory/PartCategory.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/PartCategory/PartCategoryManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/PartCategory/PartCategoryManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/PartCategory/PartCategoryService.php -> src/backend/de/RaumZeitLabor/PartKeepr/PartCategory/PartCategoryService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/PartDistributor/PartDistributorManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/PartDistributor/PartDistributorManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/PartDistributor/PartDistributorService.php -> src/backend/de/RaumZeitLabor/PartKeepr/PartDistributor/PartDistributorService.php | 0
Asrc/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php | 262+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rsrc/de/RaumZeitLabor/PartKeepr/PartParameter/PartParameter.php -> src/backend/de/RaumZeitLabor/PartKeepr/PartParameter/PartParameter.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/PartUnit/PartUnitManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/PartUnit/PartUnitManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/PartUnit/PartUnitService.php -> src/backend/de/RaumZeitLabor/PartKeepr/PartUnit/PartUnitService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Ping/PingService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Ping/PingService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/REST/ApplicationController.php -> src/backend/de/RaumZeitLabor/PartKeepr/REST/ApplicationController.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/REST/Model.php -> src/backend/de/RaumZeitLabor/PartKeepr/REST/Model.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/REST/Request.php -> src/backend/de/RaumZeitLabor/PartKeepr/REST/Request.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/REST/Response.php -> src/backend/de/RaumZeitLabor/PartKeepr/REST/Response.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Service/AdminService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Service/AdminService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Service/AnonService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Service/AnonService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Service/Exceptions/ServiceException.php -> src/backend/de/RaumZeitLabor/PartKeepr/Service/Exceptions/ServiceException.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Service/RestfulService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Service/RestfulService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Service/Service.php -> src/backend/de/RaumZeitLabor/PartKeepr/Service/Service.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Service/ServiceManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/Service/ServiceManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Session/Exceptions/SessionNotFoundException.php -> src/backend/de/RaumZeitLabor/PartKeepr/Session/Exceptions/SessionNotFoundException.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Session/Session.php -> src/backend/de/RaumZeitLabor/PartKeepr/Session/Session.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Session/SessionManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/Session/SessionManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Setup/DistributorSetup.php -> src/backend/de/RaumZeitLabor/PartKeepr/Setup/DistributorSetup.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Setup/FootprintSetup.php -> src/backend/de/RaumZeitLabor/PartKeepr/Setup/FootprintSetup.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Setup/ManufacturerSetup.php -> src/backend/de/RaumZeitLabor/PartKeepr/Setup/ManufacturerSetup.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Setup/PartCategorySetup.php -> src/backend/de/RaumZeitLabor/PartKeepr/Setup/PartCategorySetup.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Setup/PartSetup.php -> src/backend/de/RaumZeitLabor/PartKeepr/Setup/PartSetup.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Setup/PartUnitSetup.php -> src/backend/de/RaumZeitLabor/PartKeepr/Setup/PartUnitSetup.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Setup/Setup.php -> src/backend/de/RaumZeitLabor/PartKeepr/Setup/Setup.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Setup/SiPrefixSetup.php -> src/backend/de/RaumZeitLabor/PartKeepr/Setup/SiPrefixSetup.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Setup/StorageLocationSetup.php -> src/backend/de/RaumZeitLabor/PartKeepr/Setup/StorageLocationSetup.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Setup/UnitSetup.php -> src/backend/de/RaumZeitLabor/PartKeepr/Setup/UnitSetup.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/SiPrefix/SiPrefix.php -> src/backend/de/RaumZeitLabor/PartKeepr/SiPrefix/SiPrefix.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/SiPrefix/SiPrefixService.php -> src/backend/de/RaumZeitLabor/PartKeepr/SiPrefix/SiPrefixService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Statistic/StatisticService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Statistic/StatisticService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Statistic/StatisticSnapshot.php -> src/backend/de/RaumZeitLabor/PartKeepr/Statistic/StatisticSnapshot.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Statistic/StatisticSnapshotManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/Statistic/StatisticSnapshotManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Statistic/StatisticSnapshotUnit.php -> src/backend/de/RaumZeitLabor/PartKeepr/Statistic/StatisticSnapshotUnit.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Stock/StockEntry.php -> src/backend/de/RaumZeitLabor/PartKeepr/Stock/StockEntry.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Stock/StockService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Stock/StockService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/StorageLocation/Exceptions/StorageLocationNotFoundException.php -> src/backend/de/RaumZeitLabor/PartKeepr/StorageLocation/Exceptions/StorageLocationNotFoundException.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocation.php -> src/backend/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocation.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocationImage.php -> src/backend/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocationImage.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocationManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocationManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocationService.php -> src/backend/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocationService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/System/SystemInformationRecord.php -> src/backend/de/RaumZeitLabor/PartKeepr/System/SystemInformationRecord.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/System/SystemService.php -> src/backend/de/RaumZeitLabor/PartKeepr/System/SystemService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/TempFile/TempFileService.php -> src/backend/de/RaumZeitLabor/PartKeepr/TempFile/TempFileService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/TempImage/TempImage.php -> src/backend/de/RaumZeitLabor/PartKeepr/TempImage/TempImage.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/TempImage/TempImageService.php -> src/backend/de/RaumZeitLabor/PartKeepr/TempImage/TempImageService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/TipOfTheDay/TipOfTheDay.php -> src/backend/de/RaumZeitLabor/PartKeepr/TipOfTheDay/TipOfTheDay.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/TipOfTheDay/TipOfTheDayHistory.php -> src/backend/de/RaumZeitLabor/PartKeepr/TipOfTheDay/TipOfTheDayHistory.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/TipOfTheDay/TipOfTheDayService.php -> src/backend/de/RaumZeitLabor/PartKeepr/TipOfTheDay/TipOfTheDayService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Unit/Unit.php -> src/backend/de/RaumZeitLabor/PartKeepr/Unit/Unit.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Unit/UnitManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/Unit/UnitManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Unit/UnitService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Unit/UnitService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/UploadedFile/TempUploadedFile.php -> src/backend/de/RaumZeitLabor/PartKeepr/UploadedFile/TempUploadedFile.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/UploadedFile/UploadedFile.php -> src/backend/de/RaumZeitLabor/PartKeepr/UploadedFile/UploadedFile.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/User/Exceptions/InvalidLoginDataException.php -> src/backend/de/RaumZeitLabor/PartKeepr/User/Exceptions/InvalidLoginDataException.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/User/Exceptions/UserAlreadyExistsException.php -> src/backend/de/RaumZeitLabor/PartKeepr/User/Exceptions/UserAlreadyExistsException.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/User/Exceptions/UserDoesNotExistException.php -> src/backend/de/RaumZeitLabor/PartKeepr/User/Exceptions/UserDoesNotExistException.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/User/User.php -> src/backend/de/RaumZeitLabor/PartKeepr/User/User.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/User/UserManager.php -> src/backend/de/RaumZeitLabor/PartKeepr/User/UserManager.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/User/UserService.php -> src/backend/de/RaumZeitLabor/PartKeepr/User/UserService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/UserPreference/UserPreference.php -> src/backend/de/RaumZeitLabor/PartKeepr/UserPreference/UserPreference.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/UserPreference/UserPreferenceService.php -> src/backend/de/RaumZeitLabor/PartKeepr/UserPreference/UserPreferenceService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Util/BaseEntity.php -> src/backend/de/RaumZeitLabor/PartKeepr/Util/BaseEntity.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Util/Configuration.php -> src/backend/de/RaumZeitLabor/PartKeepr/Util/Configuration.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Util/Deserializable.php -> src/backend/de/RaumZeitLabor/PartKeepr/Util/Deserializable.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Util/Exceptions/EntityNotFoundException.php -> src/backend/de/RaumZeitLabor/PartKeepr/Util/Exceptions/EntityNotFoundException.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Util/Exceptions/OutOfRangeException.php -> src/backend/de/RaumZeitLabor/PartKeepr/Util/Exceptions/OutOfRangeException.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Util/Serializable.php -> src/backend/de/RaumZeitLabor/PartKeepr/Util/Serializable.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Util/SerializableException.php -> src/backend/de/RaumZeitLabor/PartKeepr/Util/SerializableException.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Util/Singleton.php -> src/backend/de/RaumZeitLabor/PartKeepr/Util/Singleton.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Util/UtilService.php -> src/backend/de/RaumZeitLabor/PartKeepr/Util/UtilService.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Versions/Version20110817235003.php -> src/backend/de/RaumZeitLabor/PartKeepr/Versions/Version20110817235003.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Versions/Version20110818051810.php -> src/backend/de/RaumZeitLabor/PartKeepr/Versions/Version20110818051810.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Versions/Version20110907043603.php -> src/backend/de/RaumZeitLabor/PartKeepr/Versions/Version20110907043603.php | 0
Rsrc/de/RaumZeitLabor/PartKeepr/Versions/Version20110908020532.php -> src/backend/de/RaumZeitLabor/PartKeepr/Versions/Version20110908020532.php | 0
Dsrc/de/RaumZeitLabor/PartKeepr/PartKeepr.php | 262-------------------------------------------------------------------------------
Msrc/frontend/file.php | 2+-
Msrc/frontend/image.php | 2+-
Msrc/frontend/index.php | 2+-
Msrc/frontend/rest.php | 2+-
Msrc/frontend/rss.php | 2+-
Msrc/frontend/service.php | 2+-
Msrc/frontend/upload.php | 2+-
Mtesting/PartTest.php | 2+-
Mtesting/Service.php | 2+-
Mtesting/SetupDatabase.php | 2+-
Mtesting/genman.php | 2+-
Mtests/bootstrap.php | 2+-
134 files changed, 281 insertions(+), 281 deletions(-)

diff --git a/cronjobs/CreateRSSFeed.php b/cronjobs/CreateRSSFeed.php @@ -3,7 +3,7 @@ namespace de\RaumZeitLabor\PartKeepr\Cronjobs; declare(encoding = 'UTF-8'); -include(__DIR__."/../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include(__DIR__."/../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); use de\RaumZeitLabor\PartKeepr\PartKeepr; use de\RaumZeitLabor\PartKeepr\Util\Configuration; diff --git a/cronjobs/CreateStatisticSnapshot.php b/cronjobs/CreateStatisticSnapshot.php @@ -3,7 +3,7 @@ namespace de\RaumZeitLabor\PartKeepr\Cronjobs; declare(encoding = 'UTF-8'); -include(__DIR__."/../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include(__DIR__."/../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); use de\RaumZeitLabor\PartKeepr\PartKeepr; use de\RaumZeitLabor\PartKeepr\Statistic\StatisticSnapshotManager; diff --git a/cronjobs/UpdatePartCacheData.php b/cronjobs/UpdatePartCacheData.php @@ -3,7 +3,7 @@ namespace de\RaumZeitLabor\PartKeepr\Cronjobs; declare(encoding = 'UTF-8'); -include(__DIR__."/../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include(__DIR__."/../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); use de\RaumZeitLabor\PartKeepr\PartKeepr; use de\RaumZeitLabor\PartKeepr\Statistic\StatisticSnapshotManager; diff --git a/cronjobs/UpdateTipsOfTheDay.php b/cronjobs/UpdateTipsOfTheDay.php @@ -12,7 +12,7 @@ namespace de\RaumZeitLabor\PartKeepr\Cronjobs; declare(encoding = 'UTF-8'); -include(__DIR__."/../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include(__DIR__."/../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); use de\RaumZeitLabor\PartKeepr\PartKeepr; use de\RaumZeitLabor\PartKeepr\TipOfTheDay\TipOfTheDay; diff --git a/doctrine.php b/doctrine.php @@ -4,7 +4,7 @@ declare(encoding = 'UTF-8'); use de\RaumZeitLabor\PartKeepr\PartKeepr; -include("src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include("src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); PartKeepr::initialize(""); // Variable $helperSet is defined inside cli-config.php diff --git a/migrations.yml b/migrations.yml @@ -2,4 +2,4 @@ name: PartKeepr migrations_namespace: DoctrineMigrations table_name: SchemaVersions -migrations_directory: src/de/RaumZeitLabor/PartKeepr/Versions- \ No newline at end of file +migrations_directory: src/backend/de/RaumZeitLabor/PartKeepr/Versions+ \ No newline at end of file diff --git a/src/de/RaumZeitLabor/PartKeepr/Auth/AuthService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Auth/AuthService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Category/AbstractCategory.php b/src/backend/de/RaumZeitLabor/PartKeepr/Category/AbstractCategory.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Category/AbstractCategoryManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/Category/AbstractCategoryManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Category/AbstractCategoryService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Category/AbstractCategoryService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Category/Exceptions/CategoryNotFoundException.php b/src/backend/de/RaumZeitLabor/PartKeepr/Category/Exceptions/CategoryNotFoundException.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Distributor/Distributor.php b/src/backend/de/RaumZeitLabor/PartKeepr/Distributor/Distributor.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Distributor/DistributorManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/Distributor/DistributorManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Distributor/DistributorService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Distributor/DistributorService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Footprint/Footprint.php b/src/backend/de/RaumZeitLabor/PartKeepr/Footprint/Footprint.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Footprint/FootprintAttachment.php b/src/backend/de/RaumZeitLabor/PartKeepr/Footprint/FootprintAttachment.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Footprint/FootprintImage.php b/src/backend/de/RaumZeitLabor/PartKeepr/Footprint/FootprintImage.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Footprint/FootprintManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/Footprint/FootprintManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Footprint/FootprintService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Footprint/FootprintService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/FootprintAttachment/FootprintAttachmentManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/FootprintAttachment/FootprintAttachmentManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/FootprintAttachment/FootprintAttachmentService.php b/src/backend/de/RaumZeitLabor/PartKeepr/FootprintAttachment/FootprintAttachmentService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/FootprintCategory/FootprintCategory.php b/src/backend/de/RaumZeitLabor/PartKeepr/FootprintCategory/FootprintCategory.php diff --git a/src/de/RaumZeitLabor/PartKeepr/FootprintCategory/FootprintCategoryManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/FootprintCategory/FootprintCategoryManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/FootprintCategory/FootprintCategoryService.php b/src/backend/de/RaumZeitLabor/PartKeepr/FootprintCategory/FootprintCategoryService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Image/CachedImage.php b/src/backend/de/RaumZeitLabor/PartKeepr/Image/CachedImage.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Image/Exceptions/InvalidImageTypeException.php b/src/backend/de/RaumZeitLabor/PartKeepr/Image/Exceptions/InvalidImageTypeException.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Image/Image.php b/src/backend/de/RaumZeitLabor/PartKeepr/Image/Image.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Manufacturer/Manufacturer.php b/src/backend/de/RaumZeitLabor/PartKeepr/Manufacturer/Manufacturer.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Manufacturer/ManufacturerICLogo.php b/src/backend/de/RaumZeitLabor/PartKeepr/Manufacturer/ManufacturerICLogo.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Manufacturer/ManufacturerManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/Manufacturer/ManufacturerManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Manufacturer/ManufacturerService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Manufacturer/ManufacturerService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/ManufacturerICLogo/ManufacturerICLogoManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/ManufacturerICLogo/ManufacturerICLogoManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/ManufacturerICLogo/ManufacturerICLogoService.php b/src/backend/de/RaumZeitLabor/PartKeepr/ManufacturerICLogo/ManufacturerICLogoService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Part/Part.php b/src/backend/de/RaumZeitLabor/PartKeepr/Part/Part.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Part/PartAttachment.php b/src/backend/de/RaumZeitLabor/PartKeepr/Part/PartAttachment.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Part/PartDistributor.php b/src/backend/de/RaumZeitLabor/PartKeepr/Part/PartDistributor.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Part/PartImage.php b/src/backend/de/RaumZeitLabor/PartKeepr/Part/PartImage.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Part/PartManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/Part/PartManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Part/PartManufacturer.php b/src/backend/de/RaumZeitLabor/PartKeepr/Part/PartManufacturer.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Part/PartService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Part/PartService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Part/PartUnit.php b/src/backend/de/RaumZeitLabor/PartKeepr/Part/PartUnit.php diff --git a/src/de/RaumZeitLabor/PartKeepr/PartCategory/PartCategory.php b/src/backend/de/RaumZeitLabor/PartKeepr/PartCategory/PartCategory.php diff --git a/src/de/RaumZeitLabor/PartKeepr/PartCategory/PartCategoryManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/PartCategory/PartCategoryManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/PartCategory/PartCategoryService.php b/src/backend/de/RaumZeitLabor/PartKeepr/PartCategory/PartCategoryService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/PartDistributor/PartDistributorManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/PartDistributor/PartDistributorManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/PartDistributor/PartDistributorService.php b/src/backend/de/RaumZeitLabor/PartKeepr/PartDistributor/PartDistributorService.php diff --git a/src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php b/src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php @@ -0,0 +1,261 @@ +<?php +namespace de\RaumZeitLabor\PartKeepr; + +use Doctrine\Common\ClassLoader, + Doctrine\ORM\Configuration, + Doctrine\ORM\EntityManager, + de\RaumZeitLabor\PartKeepr\Util\Configuration as PartKeeprConfiguration; + + + +class PartKeepr { + /** + * + * Contains the doctrine entity manager. + * @var Doctrine\ORM\EntityManager + */ + private static $entityManager = null; + + /** + * Initializes the PartKeepr system + * + * You *need* to call this method before doing anything else. + * + * An environment is used to load a different configuration file. + * Usually, you don't need to pass anything here. + * + * @param $environment string The environment to use, null otherwise. + * @return nothing + */ + public static function initialize ($environment = null) { + self::initializeClassLoaders(); + self::initializeConfig($environment); + self::initializeDoctrine(); + } + + /** + * Initializes the doctrine class loader and sets up the + * directories. + * + * @param none + * @return nothing + */ + public static function initializeClassLoaders() { + require_once 'Doctrine/Common/ClassLoader.php'; + + + $classLoader = new ClassLoader('de\RaumZeitLabor\PartKeepr', dirname(dirname(dirname(__DIR__)))); + $classLoader->register(); // register on SPL autoload stack + + $classLoader = new ClassLoader('Doctrine\ORM'); + $classLoader->register(); // register on SPL autoload stack + + $classLoader = new ClassLoader("Doctrine\DBAL\Migrations", dirname(dirname(dirname(dirname(dirname(__DIR__))))) ."/3rdparty/doctrine-migrations/lib"); + $classLoader->register(); + + $classLoader = new ClassLoader('Doctrine\DBAL'); + $classLoader->register(); // register on SPL autoload stack + + $classLoader = new ClassLoader('Doctrine\Common'); + $classLoader->register(); // register on SPL autoload stack + + $classLoader = new ClassLoader('Symfony', 'Doctrine'); + $classLoader->register(); // register on SPL autoload stack + + $classLoader = new ClassLoader("DoctrineExtensions\NestedSet", dirname(dirname(dirname(dirname(dirname(__DIR__))))) ."/3rdparty/doctrine2-nestedset/lib"); + $classLoader->register(); + + + } + + + /** + * Initializes the configuration for a given environment. + * + * An environment is used to load a different configuration file. + * + * Usually, you don't need to pass anything here. + * + * + * @param $environment string The environment to use, null otherwise. + * @return nothing + */ + public static function initializeConfig ($environment = null) { + if ($environment != null) { + include(dirname(dirname(dirname(dirname(dirname(__DIR__)))))."/config-$environment.php"); + } else { + include(dirname(dirname(dirname(dirname(dirname(__DIR__)))))."/config.php"); + } + + } + + /** + * Initializes the doctrine framework and + * sets all required configuration options. + * + * @param none + * @return nothing + */ + public static function initializeDoctrine () { + + + $config = new Configuration; + + $driverImpl = $config->newDefaultAnnotationDriver( + array(__DIR__) + //array(__DIR__."/Session") + + ); + $config->setMetadataDriverImpl($driverImpl); + + $connectionOptions = array( + 'driver' => PartKeeprConfiguration::getOption("partkeepr.database.driver","pdo_mysql"), + 'dbname' => PartKeeprConfiguration::getOption("partkeepr.database.dbname", "partkeepr"), + 'user' => PartKeeprConfiguration::getOption("partkeepr.database.username", "partkeepr"), + 'password' => PartKeeprConfiguration::getOption("partkeepr.database.password", "partkeepr"), + 'host' => PartKeeprConfiguration::getOption("partkeepr.database.hostname", "localhost") + ); + + if (extension_loaded("apc")) { + $cache = new \Doctrine\Common\Cache\ApcCache(); + } else { + $cache = new \Doctrine\Common\Cache\ArrayCache(); + } + + $config->setMetadataCacheImpl($cache); + + $config->setQueryCacheImpl($cache); + + $config->setProxyDir(dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/data/proxies'); + $config->setProxyNamespace('Proxies'); + $config->setEntityNamespaces(self::getEntityClasses()); + $config->setAutoGenerateProxyClasses(false); + + if (PartKeeprConfiguration::getOption("partkeepr.database.echo_sql_log", false) === true) { + $logger = new \Doctrine\DBAL\Logging\EchoSQLLogger(); + $config->setSQLLogger($logger); + } + + self::$entityManager = EntityManager::create($connectionOptions, $config); + } + + /** + * Returns the EntityManager. Shortcut for getEntityManager(). + * @return Doctrine\ORM\EntityManager The EntityManager + */ + public static function getEM () { + return self::getEntityManager(); + } + + /** + * Returns the EntityManager. + * @return Doctrine\ORM\EntityManager The EntityManager + */ + public static function getEntityManager () { + if (!self::$entityManager instanceof EntityManager) { + throw new Exception("No EntityManager found. Make sure you called initializeDoctrine() or initialize()."); + } + return self::$entityManager; + } + + /** + * Returns the class metadata for all entity classes + * @return array an array of class metadata objects + */ + public static function getClassMetaData () { + $classes = self::getEntityClasses(); + + $aClasses = array(); + + foreach ($classes as $class) { + $aClasses[] = PartKeepr::getEM()->getClassMetadata($class); + } + + return $aClasses; + } + + /** + * Returns a list of all classes we use for entities. + * @return array An array of strings with all class names + */ + public static function getEntityClasses () { + return array( + 'de\RaumZeitLabor\PartKeepr\User\User', + 'de\RaumZeitLabor\PartKeepr\Session\Session', + + 'de\RaumZeitLabor\PartKeepr\Footprint\Footprint', + 'de\RaumZeitLabor\PartKeepr\Footprint\FootprintImage', + 'de\RaumZeitLabor\PartKeepr\Footprint\FootprintAttachment', + 'de\RaumZeitLabor\PartKeepr\FootprintCategory\FootprintCategory', + + 'de\RaumZeitLabor\PartKeepr\Part\Part', + 'de\RaumZeitLabor\PartKeepr\Part\PartUnit', + 'de\RaumZeitLabor\PartKeepr\Part\PartManufacturer', + 'de\RaumZeitLabor\PartKeepr\Part\PartDistributor', + 'de\RaumZeitLabor\PartKeepr\Part\PartImage', + 'de\RaumZeitLabor\PartKeepr\Part\PartAttachment', + 'de\RaumZeitLabor\PartKeepr\PartCategory\PartCategory', + + 'de\RaumZeitLabor\PartKeepr\StorageLocation\StorageLocation', + 'de\RaumZeitLabor\PartKeepr\StorageLocation\StorageLocationImage', + + 'de\RaumZeitLabor\PartKeepr\Stock\StockEntry', + + 'de\RaumZeitLabor\PartKeepr\Manufacturer\Manufacturer', + 'de\RaumZeitLabor\PartKeepr\Manufacturer\ManufacturerICLogo', + + 'de\RaumZeitLabor\PartKeepr\Distributor\Distributor', + + 'de\RaumZeitLabor\PartKeepr\Image\Image', + 'de\RaumZeitLabor\PartKeepr\Image\CachedImage', + 'de\RaumZeitLabor\PartKeepr\TempImage\TempImage', + + 'de\RaumZeitLabor\PartKeepr\UploadedFile\TempUploadedFile', + + 'de\RaumZeitLabor\PartKeepr\Statistic\StatisticSnapshot', + 'de\RaumZeitLabor\PartKeepr\Statistic\StatisticSnapshotUnit', + 'de\RaumZeitLabor\PartKeepr\SiPrefix\SiPrefix', + 'de\RaumZeitLabor\PartKeepr\Unit\Unit', + 'de\RaumZeitLabor\PartKeepr\PartParameter\PartParameter', + + 'de\RaumZeitLabor\PartKeepr\TipOfTheDay\TipOfTheDay', + 'de\RaumZeitLabor\PartKeepr\TipOfTheDay\TipOfTheDayHistory', + 'de\RaumZeitLabor\PartKeepr\UserPreference\UserPreference' + ); + } + + /** + *@todo stub + */ + public static function i18n ($string) { + return $string; + } + + /** + * Returns a new GUID. + * @return string The new GUID + */ + public static function createGUIDv4() { + return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', + + // 32 bits for "time_low" + mt_rand(0, 0xffff), mt_rand(0, 0xffff), + + // 16 bits for "time_mid" + mt_rand(0, 0xffff), + + // 16 bits for "time_hi_and_version", + // four most significant bits holds version number 4 + mt_rand(0, 0x0fff) | 0x4000, + + // 16 bits, 8 bits for "clk_seq_hi_res", + // 8 bits for "clk_seq_low", + // two most significant bits holds zero and one for variant DCE1.1 + mt_rand(0, 0x3fff) | 0x8000, + + // 48 bits for "node" + mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) + ); + } +} +?>+ \ No newline at end of file diff --git a/src/de/RaumZeitLabor/PartKeepr/PartParameter/PartParameter.php b/src/backend/de/RaumZeitLabor/PartKeepr/PartParameter/PartParameter.php diff --git a/src/de/RaumZeitLabor/PartKeepr/PartUnit/PartUnitManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/PartUnit/PartUnitManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/PartUnit/PartUnitService.php b/src/backend/de/RaumZeitLabor/PartKeepr/PartUnit/PartUnitService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Ping/PingService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Ping/PingService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/REST/ApplicationController.php b/src/backend/de/RaumZeitLabor/PartKeepr/REST/ApplicationController.php diff --git a/src/de/RaumZeitLabor/PartKeepr/REST/Model.php b/src/backend/de/RaumZeitLabor/PartKeepr/REST/Model.php diff --git a/src/de/RaumZeitLabor/PartKeepr/REST/Request.php b/src/backend/de/RaumZeitLabor/PartKeepr/REST/Request.php diff --git a/src/de/RaumZeitLabor/PartKeepr/REST/Response.php b/src/backend/de/RaumZeitLabor/PartKeepr/REST/Response.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Service/AdminService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Service/AdminService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Service/AnonService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Service/AnonService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Service/Exceptions/ServiceException.php b/src/backend/de/RaumZeitLabor/PartKeepr/Service/Exceptions/ServiceException.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Service/RestfulService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Service/RestfulService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Service/Service.php b/src/backend/de/RaumZeitLabor/PartKeepr/Service/Service.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Service/ServiceManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/Service/ServiceManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Session/Exceptions/SessionNotFoundException.php b/src/backend/de/RaumZeitLabor/PartKeepr/Session/Exceptions/SessionNotFoundException.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Session/Session.php b/src/backend/de/RaumZeitLabor/PartKeepr/Session/Session.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Session/SessionManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/Session/SessionManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Setup/DistributorSetup.php b/src/backend/de/RaumZeitLabor/PartKeepr/Setup/DistributorSetup.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Setup/FootprintSetup.php b/src/backend/de/RaumZeitLabor/PartKeepr/Setup/FootprintSetup.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Setup/ManufacturerSetup.php b/src/backend/de/RaumZeitLabor/PartKeepr/Setup/ManufacturerSetup.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Setup/PartCategorySetup.php b/src/backend/de/RaumZeitLabor/PartKeepr/Setup/PartCategorySetup.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Setup/PartSetup.php b/src/backend/de/RaumZeitLabor/PartKeepr/Setup/PartSetup.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Setup/PartUnitSetup.php b/src/backend/de/RaumZeitLabor/PartKeepr/Setup/PartUnitSetup.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Setup/Setup.php b/src/backend/de/RaumZeitLabor/PartKeepr/Setup/Setup.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Setup/SiPrefixSetup.php b/src/backend/de/RaumZeitLabor/PartKeepr/Setup/SiPrefixSetup.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Setup/StorageLocationSetup.php b/src/backend/de/RaumZeitLabor/PartKeepr/Setup/StorageLocationSetup.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Setup/UnitSetup.php b/src/backend/de/RaumZeitLabor/PartKeepr/Setup/UnitSetup.php diff --git a/src/de/RaumZeitLabor/PartKeepr/SiPrefix/SiPrefix.php b/src/backend/de/RaumZeitLabor/PartKeepr/SiPrefix/SiPrefix.php diff --git a/src/de/RaumZeitLabor/PartKeepr/SiPrefix/SiPrefixService.php b/src/backend/de/RaumZeitLabor/PartKeepr/SiPrefix/SiPrefixService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Statistic/StatisticService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Statistic/StatisticService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Statistic/StatisticSnapshot.php b/src/backend/de/RaumZeitLabor/PartKeepr/Statistic/StatisticSnapshot.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Statistic/StatisticSnapshotManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/Statistic/StatisticSnapshotManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Statistic/StatisticSnapshotUnit.php b/src/backend/de/RaumZeitLabor/PartKeepr/Statistic/StatisticSnapshotUnit.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Stock/StockEntry.php b/src/backend/de/RaumZeitLabor/PartKeepr/Stock/StockEntry.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Stock/StockService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Stock/StockService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/StorageLocation/Exceptions/StorageLocationNotFoundException.php b/src/backend/de/RaumZeitLabor/PartKeepr/StorageLocation/Exceptions/StorageLocationNotFoundException.php diff --git a/src/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocation.php b/src/backend/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocation.php diff --git a/src/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocationImage.php b/src/backend/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocationImage.php diff --git a/src/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocationManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocationManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocationService.php b/src/backend/de/RaumZeitLabor/PartKeepr/StorageLocation/StorageLocationService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/System/SystemInformationRecord.php b/src/backend/de/RaumZeitLabor/PartKeepr/System/SystemInformationRecord.php diff --git a/src/de/RaumZeitLabor/PartKeepr/System/SystemService.php b/src/backend/de/RaumZeitLabor/PartKeepr/System/SystemService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/TempFile/TempFileService.php b/src/backend/de/RaumZeitLabor/PartKeepr/TempFile/TempFileService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/TempImage/TempImage.php b/src/backend/de/RaumZeitLabor/PartKeepr/TempImage/TempImage.php diff --git a/src/de/RaumZeitLabor/PartKeepr/TempImage/TempImageService.php b/src/backend/de/RaumZeitLabor/PartKeepr/TempImage/TempImageService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/TipOfTheDay/TipOfTheDay.php b/src/backend/de/RaumZeitLabor/PartKeepr/TipOfTheDay/TipOfTheDay.php diff --git a/src/de/RaumZeitLabor/PartKeepr/TipOfTheDay/TipOfTheDayHistory.php b/src/backend/de/RaumZeitLabor/PartKeepr/TipOfTheDay/TipOfTheDayHistory.php diff --git a/src/de/RaumZeitLabor/PartKeepr/TipOfTheDay/TipOfTheDayService.php b/src/backend/de/RaumZeitLabor/PartKeepr/TipOfTheDay/TipOfTheDayService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Unit/Unit.php b/src/backend/de/RaumZeitLabor/PartKeepr/Unit/Unit.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Unit/UnitManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/Unit/UnitManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Unit/UnitService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Unit/UnitService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/UploadedFile/TempUploadedFile.php b/src/backend/de/RaumZeitLabor/PartKeepr/UploadedFile/TempUploadedFile.php diff --git a/src/de/RaumZeitLabor/PartKeepr/UploadedFile/UploadedFile.php b/src/backend/de/RaumZeitLabor/PartKeepr/UploadedFile/UploadedFile.php diff --git a/src/de/RaumZeitLabor/PartKeepr/User/Exceptions/InvalidLoginDataException.php b/src/backend/de/RaumZeitLabor/PartKeepr/User/Exceptions/InvalidLoginDataException.php diff --git a/src/de/RaumZeitLabor/PartKeepr/User/Exceptions/UserAlreadyExistsException.php b/src/backend/de/RaumZeitLabor/PartKeepr/User/Exceptions/UserAlreadyExistsException.php diff --git a/src/de/RaumZeitLabor/PartKeepr/User/Exceptions/UserDoesNotExistException.php b/src/backend/de/RaumZeitLabor/PartKeepr/User/Exceptions/UserDoesNotExistException.php diff --git a/src/de/RaumZeitLabor/PartKeepr/User/User.php b/src/backend/de/RaumZeitLabor/PartKeepr/User/User.php diff --git a/src/de/RaumZeitLabor/PartKeepr/User/UserManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/User/UserManager.php diff --git a/src/de/RaumZeitLabor/PartKeepr/User/UserService.php b/src/backend/de/RaumZeitLabor/PartKeepr/User/UserService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/UserPreference/UserPreference.php b/src/backend/de/RaumZeitLabor/PartKeepr/UserPreference/UserPreference.php diff --git a/src/de/RaumZeitLabor/PartKeepr/UserPreference/UserPreferenceService.php b/src/backend/de/RaumZeitLabor/PartKeepr/UserPreference/UserPreferenceService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Util/BaseEntity.php b/src/backend/de/RaumZeitLabor/PartKeepr/Util/BaseEntity.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Util/Configuration.php b/src/backend/de/RaumZeitLabor/PartKeepr/Util/Configuration.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Util/Deserializable.php b/src/backend/de/RaumZeitLabor/PartKeepr/Util/Deserializable.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Util/Exceptions/EntityNotFoundException.php b/src/backend/de/RaumZeitLabor/PartKeepr/Util/Exceptions/EntityNotFoundException.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Util/Exceptions/OutOfRangeException.php b/src/backend/de/RaumZeitLabor/PartKeepr/Util/Exceptions/OutOfRangeException.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Util/Serializable.php b/src/backend/de/RaumZeitLabor/PartKeepr/Util/Serializable.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Util/SerializableException.php b/src/backend/de/RaumZeitLabor/PartKeepr/Util/SerializableException.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Util/Singleton.php b/src/backend/de/RaumZeitLabor/PartKeepr/Util/Singleton.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Util/UtilService.php b/src/backend/de/RaumZeitLabor/PartKeepr/Util/UtilService.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Versions/Version20110817235003.php b/src/backend/de/RaumZeitLabor/PartKeepr/Versions/Version20110817235003.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Versions/Version20110818051810.php b/src/backend/de/RaumZeitLabor/PartKeepr/Versions/Version20110818051810.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Versions/Version20110907043603.php b/src/backend/de/RaumZeitLabor/PartKeepr/Versions/Version20110907043603.php diff --git a/src/de/RaumZeitLabor/PartKeepr/Versions/Version20110908020532.php b/src/backend/de/RaumZeitLabor/PartKeepr/Versions/Version20110908020532.php diff --git a/src/de/RaumZeitLabor/PartKeepr/PartKeepr.php b/src/de/RaumZeitLabor/PartKeepr/PartKeepr.php @@ -1,261 +0,0 @@ -<?php -namespace de\RaumZeitLabor\PartKeepr; - -use Doctrine\Common\ClassLoader, - Doctrine\ORM\Configuration, - Doctrine\ORM\EntityManager, - de\RaumZeitLabor\PartKeepr\Util\Configuration as PartKeeprConfiguration; - - - -class PartKeepr { - /** - * - * Contains the doctrine entity manager. - * @var Doctrine\ORM\EntityManager - */ - private static $entityManager = null; - - /** - * Initializes the PartKeepr system - * - * You *need* to call this method before doing anything else. - * - * An environment is used to load a different configuration file. - * Usually, you don't need to pass anything here. - * - * @param $environment string The environment to use, null otherwise. - * @return nothing - */ - public static function initialize ($environment = null) { - self::initializeClassLoaders(); - self::initializeConfig($environment); - self::initializeDoctrine(); - } - - /** - * Initializes the doctrine class loader and sets up the - * directories. - * - * @param none - * @return nothing - */ - public static function initializeClassLoaders() { - require_once 'Doctrine/Common/ClassLoader.php'; - - - $classLoader = new ClassLoader('de\RaumZeitLabor\PartKeepr', dirname(dirname(dirname(__DIR__)))); - $classLoader->register(); // register on SPL autoload stack - - $classLoader = new ClassLoader('Doctrine\ORM'); - $classLoader->register(); // register on SPL autoload stack - - $classLoader = new ClassLoader("Doctrine\DBAL\Migrations", dirname(dirname(dirname(dirname(__DIR__)))) ."/3rdparty/doctrine-migrations/lib"); - $classLoader->register(); - - $classLoader = new ClassLoader('Doctrine\DBAL'); - $classLoader->register(); // register on SPL autoload stack - - $classLoader = new ClassLoader('Doctrine\Common'); - $classLoader->register(); // register on SPL autoload stack - - $classLoader = new ClassLoader('Symfony', 'Doctrine'); - $classLoader->register(); // register on SPL autoload stack - - $classLoader = new ClassLoader("DoctrineExtensions\NestedSet", dirname(dirname(dirname(dirname(__DIR__)))) ."/3rdparty/doctrine2-nestedset/lib"); - $classLoader->register(); - - - } - - - /** - * Initializes the configuration for a given environment. - * - * An environment is used to load a different configuration file. - * - * Usually, you don't need to pass anything here. - * - * - * @param $environment string The environment to use, null otherwise. - * @return nothing - */ - public static function initializeConfig ($environment = null) { - if ($environment != null) { - include(dirname(dirname(dirname(dirname(__DIR__))))."/config-$environment.php"); - } else { - include(dirname(dirname(dirname(dirname(__DIR__))))."/config.php"); - } - - } - - /** - * Initializes the doctrine framework and - * sets all required configuration options. - * - * @param none - * @return nothing - */ - public static function initializeDoctrine () { - - - $config = new Configuration; - - $driverImpl = $config->newDefaultAnnotationDriver( - array(__DIR__) - //array(__DIR__."/Session") - - ); - $config->setMetadataDriverImpl($driverImpl); - - $connectionOptions = array( - 'driver' => PartKeeprConfiguration::getOption("partkeepr.database.driver","pdo_mysql"), - 'dbname' => PartKeeprConfiguration::getOption("partkeepr.database.dbname", "partkeepr"), - 'user' => PartKeeprConfiguration::getOption("partkeepr.database.username", "partkeepr"), - 'password' => PartKeeprConfiguration::getOption("partkeepr.database.password", "partkeepr"), - 'host' => PartKeeprConfiguration::getOption("partkeepr.database.hostname", "localhost") - ); - - if (extension_loaded("apc")) { - $cache = new \Doctrine\Common\Cache\ApcCache(); - } else { - $cache = new \Doctrine\Common\Cache\ArrayCache(); - } - - $config->setMetadataCacheImpl($cache); - - $config->setQueryCacheImpl($cache); - - $config->setProxyDir(dirname(dirname(dirname(__DIR__))) . '/Proxies'); - $config->setProxyNamespace('Proxies'); - $config->setEntityNamespaces(self::getEntityClasses()); - $config->setAutoGenerateProxyClasses(false); - - if (PartKeeprConfiguration::getOption("partkeepr.database.echo_sql_log", false) === true) { - $logger = new \Doctrine\DBAL\Logging\EchoSQLLogger(); - $config->setSQLLogger($logger); - } - - self::$entityManager = EntityManager::create($connectionOptions, $config); - } - - /** - * Returns the EntityManager. Shortcut for getEntityManager(). - * @return Doctrine\ORM\EntityManager The EntityManager - */ - public static function getEM () { - return self::getEntityManager(); - } - - /** - * Returns the EntityManager. - * @return Doctrine\ORM\EntityManager The EntityManager - */ - public static function getEntityManager () { - if (!self::$entityManager instanceof EntityManager) { - throw new Exception("No EntityManager found. Make sure you called initializeDoctrine() or initialize()."); - } - return self::$entityManager; - } - - /** - * Returns the class metadata for all entity classes - * @return array an array of class metadata objects - */ - public static function getClassMetaData () { - $classes = self::getEntityClasses(); - - $aClasses = array(); - - foreach ($classes as $class) { - $aClasses[] = PartKeepr::getEM()->getClassMetadata($class); - } - - return $aClasses; - } - - /** - * Returns a list of all classes we use for entities. - * @return array An array of strings with all class names - */ - public static function getEntityClasses () { - return array( - 'de\RaumZeitLabor\PartKeepr\User\User', - 'de\RaumZeitLabor\PartKeepr\Session\Session', - - 'de\RaumZeitLabor\PartKeepr\Footprint\Footprint', - 'de\RaumZeitLabor\PartKeepr\Footprint\FootprintImage', - 'de\RaumZeitLabor\PartKeepr\Footprint\FootprintAttachment', - 'de\RaumZeitLabor\PartKeepr\FootprintCategory\FootprintCategory', - - 'de\RaumZeitLabor\PartKeepr\Part\Part', - 'de\RaumZeitLabor\PartKeepr\Part\PartUnit', - 'de\RaumZeitLabor\PartKeepr\Part\PartManufacturer', - 'de\RaumZeitLabor\PartKeepr\Part\PartDistributor', - 'de\RaumZeitLabor\PartKeepr\Part\PartImage', - 'de\RaumZeitLabor\PartKeepr\Part\PartAttachment', - 'de\RaumZeitLabor\PartKeepr\PartCategory\PartCategory', - - 'de\RaumZeitLabor\PartKeepr\StorageLocation\StorageLocation', - 'de\RaumZeitLabor\PartKeepr\StorageLocation\StorageLocationImage', - - 'de\RaumZeitLabor\PartKeepr\Stock\StockEntry', - - 'de\RaumZeitLabor\PartKeepr\Manufacturer\Manufacturer', - 'de\RaumZeitLabor\PartKeepr\Manufacturer\ManufacturerICLogo', - - 'de\RaumZeitLabor\PartKeepr\Distributor\Distributor', - - 'de\RaumZeitLabor\PartKeepr\Image\Image', - 'de\RaumZeitLabor\PartKeepr\Image\CachedImage', - 'de\RaumZeitLabor\PartKeepr\TempImage\TempImage', - - 'de\RaumZeitLabor\PartKeepr\UploadedFile\TempUploadedFile', - - 'de\RaumZeitLabor\PartKeepr\Statistic\StatisticSnapshot', - 'de\RaumZeitLabor\PartKeepr\Statistic\StatisticSnapshotUnit', - 'de\RaumZeitLabor\PartKeepr\SiPrefix\SiPrefix', - 'de\RaumZeitLabor\PartKeepr\Unit\Unit', - 'de\RaumZeitLabor\PartKeepr\PartParameter\PartParameter', - - 'de\RaumZeitLabor\PartKeepr\TipOfTheDay\TipOfTheDay', - 'de\RaumZeitLabor\PartKeepr\TipOfTheDay\TipOfTheDayHistory', - 'de\RaumZeitLabor\PartKeepr\UserPreference\UserPreference' - ); - } - - /** - *@todo stub - */ - public static function i18n ($string) { - return $string; - } - - /** - * Returns a new GUID. - * @return string The new GUID - */ - public static function createGUIDv4() { - return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', - - // 32 bits for "time_low" - mt_rand(0, 0xffff), mt_rand(0, 0xffff), - - // 16 bits for "time_mid" - mt_rand(0, 0xffff), - - // 16 bits for "time_hi_and_version", - // four most significant bits holds version number 4 - mt_rand(0, 0x0fff) | 0x4000, - - // 16 bits, 8 bits for "clk_seq_hi_res", - // 8 bits for "clk_seq_low", - // two most significant bits holds zero and one for variant DCE1.1 - mt_rand(0, 0x3fff) | 0x8000, - - // 48 bits for "node" - mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) - ); - } -} -?>- \ No newline at end of file diff --git a/src/frontend/file.php b/src/frontend/file.php @@ -12,7 +12,7 @@ use de\RaumZeitLabor\PartKeepr\PartKeepr; use de\RaumZeitLabor\PartKeepr\Image\Image; use de\RaumZeitLabor\PartKeepr\Manufacturer\ManufacturerICLogo; -include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include("../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); PartKeepr::initialize(""); diff --git a/src/frontend/image.php b/src/frontend/image.php @@ -14,7 +14,7 @@ use de\RaumZeitLabor\PartKeepr\Image\Image; use de\RaumZeitLabor\PartKeepr\Image\CachedImage; use de\RaumZeitLabor\PartKeepr\Manufacturer\ManufacturerICLogo; -include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include("../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); PartKeepr::initialize(""); diff --git a/src/frontend/index.php b/src/frontend/index.php @@ -6,7 +6,7 @@ use de\RaumZeitLabor\PartKeepr\Service\ServiceManager; use de\RaumZeitLabor\PartKeepr\PartKeepr; use de\RaumZeitLabor\PartKeepr\Util\Configuration; -include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include("../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); PartKeepr::initialize(""); ?> diff --git a/src/frontend/rest.php b/src/frontend/rest.php @@ -5,7 +5,7 @@ declare(encoding = 'UTF-8'); use de\RaumZeitLabor\PartKeepr\PartKeepr, de\RaumZeitLabor\PartKeepr\Service\ServiceManager; -include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include("../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); PartKeepr::initialize(""); diff --git a/src/frontend/rss.php b/src/frontend/rss.php @@ -5,7 +5,7 @@ declare(encoding = 'UTF-8'); use de\RaumZeitLabor\PartKeepr\PartKeepr, de\RaumZeitLabor\PartKeepr\Util\Configuration; -include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include("../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); header("Content-Type: text/xml; charset=UTF-8"); diff --git a/src/frontend/service.php b/src/frontend/service.php @@ -5,7 +5,7 @@ declare(encoding = 'UTF-8'); use de\RaumZeitLabor\PartKeepr\Service\ServiceManager; use de\RaumZeitLabor\PartKeepr\PartKeepr; -include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include("../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); PartKeepr::initialize(""); diff --git a/src/frontend/upload.php b/src/frontend/upload.php @@ -7,7 +7,7 @@ use de\RaumZeitLabor\PartKeepr\Image\Image; use de\RaumZeitLabor\PartKeepr\Manufacturer\ManufacturerICLogo; use de\RaumZeitLabor\PartKeepr\Manufacturer\Manufacturer; -include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include("../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); PartKeepr::initialize(""); diff --git a/testing/PartTest.php b/testing/PartTest.php @@ -2,7 +2,7 @@ namespace de\RaumZeitLabor\PartKeepr\Tests; declare(encoding = 'UTF-8'); -include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include("../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); use de\RaumZeitLabor\PartKeepr\Auth\User; use de\RaumZeitLabor\PartKeepr\Footprint\Footprint; diff --git a/testing/Service.php b/testing/Service.php @@ -2,7 +2,7 @@ namespace de\RaumZeitLabor\PartKeepr\Tests; declare(encoding = 'UTF-8'); -include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include("../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); use de\RaumZeitLabor\PartKeepr\Auth\User; use de\RaumZeitLabor\PartKeepr\PartKeepr; diff --git a/testing/SetupDatabase.php b/testing/SetupDatabase.php @@ -20,7 +20,7 @@ use de\RaumZeitLabor\PartKeepr\Setup\PartSetup; declare(encoding = 'UTF-8'); -include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include("../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); /* Old things */ use de\RaumZeitLabor\PartKeepr\User\User; diff --git a/testing/genman.php b/testing/genman.php @@ -1,5 +1,5 @@ <?php -include("../src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include("../src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); use de\RaumZeitLabor\PartKeepr\PartKeepr; diff --git a/tests/bootstrap.php b/tests/bootstrap.php @@ -4,7 +4,7 @@ declare(encoding = 'UTF-8'); use de\raumzeitlabor\PartKeepr\PartKeepr; -include(dirname(__DIR__). "/src/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); +include(dirname(__DIR__). "/src/backend/de/RaumZeitLabor/PartKeepr/PartKeepr.php"); PartKeepr::initialize("test");