Revision: 196
http://sourceforge.net/p/beeframework/code/196
Author: m_plomer
Date: 2014-07-27 12:44:42 +0000 (Sun, 27 Jul 2014)
Log Message:
-----------
- minor refactorings, especially in Doctrine 2 persistence APIs
Modified Paths:
--------------
trunk/framework/Bee/Persistence/Doctrine/DaoBase.php
trunk/framework/Bee/Persistence/Doctrine/ManagerAugmenter.php
trunk/framework/Bee/Persistence/Doctrine2/AbstractGenericDao.php
trunk/framework/Bee/Persistence/Doctrine2/BeanInjection/Inject.php
trunk/framework/Bee/Persistence/Doctrine2/BeanInjection/InjectionEventListener.php
trunk/framework/Bee/Persistence/Doctrine2/ConnectionAugmenter.php
trunk/framework/Bee/Persistence/Doctrine2/DaoBase.php
trunk/framework/Bee/Persistence/Doctrine2/DaoUtils.php
trunk/framework/Bee/Persistence/Doctrine2/EntityManagerHolder.php
trunk/framework/Bee/Persistence/Doctrine2/Log4PHPLogger.php
trunk/framework/Bee/Persistence/Doctrine2/Types/EnumType.php
trunk/framework/Bee/Persistence/Exception/DataAccess.php
trunk/framework/Bee/Persistence/IOrderAndLimitHolder.php
trunk/framework/Bee/Persistence/IRestrictionHolder.php
Modified: trunk/framework/Bee/Persistence/Doctrine/DaoBase.php
===================================================================
--- trunk/framework/Bee/Persistence/Doctrine/DaoBase.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/Doctrine/DaoBase.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2008-2010 the original author or authors.
+ * Copyright 2008-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: trunk/framework/Bee/Persistence/Doctrine/ManagerAugmenter.php
===================================================================
--- trunk/framework/Bee/Persistence/Doctrine/ManagerAugmenter.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/Doctrine/ManagerAugmenter.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2008-2010 the original author or authors.
+ * Copyright 2008-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: trunk/framework/Bee/Persistence/Doctrine2/AbstractGenericDao.php
===================================================================
--- trunk/framework/Bee/Persistence/Doctrine2/AbstractGenericDao.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/Doctrine2/AbstractGenericDao.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,7 +1,7 @@
<?php
namespace Bee\Persistence\Doctrine2;
/*
- * Copyright 2008-2010 the original author or authors.
+ * Copyright 2008-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: trunk/framework/Bee/Persistence/Doctrine2/BeanInjection/Inject.php
===================================================================
--- trunk/framework/Bee/Persistence/Doctrine2/BeanInjection/Inject.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/Doctrine2/BeanInjection/Inject.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,6 +1,20 @@
<?php
namespace Bee\Persistence\Doctrine2\BeanInjection;
-
+/*
+ * Copyright 2008-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
use Doctrine\Common\Annotations\Annotation;
/**
Modified: trunk/framework/Bee/Persistence/Doctrine2/BeanInjection/InjectionEventListener.php
===================================================================
--- trunk/framework/Bee/Persistence/Doctrine2/BeanInjection/InjectionEventListener.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/Doctrine2/BeanInjection/InjectionEventListener.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,6 +1,20 @@
<?php
namespace Bee\Persistence\Doctrine2\BeanInjection;
-
+/*
+ * Copyright 2008-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
use Bee_IContext;
use Doctrine\Common\Annotations\Reader;
use Doctrine\Common\EventSubscriber;
Modified: trunk/framework/Bee/Persistence/Doctrine2/ConnectionAugmenter.php
===================================================================
--- trunk/framework/Bee/Persistence/Doctrine2/ConnectionAugmenter.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/Doctrine2/ConnectionAugmenter.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,5 +1,20 @@
<?php
namespace Bee\Persistence\Doctrine2;
+/*
+ * Copyright 2008-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
use Doctrine\Common\EventSubscriber;
use Doctrine\DBAL\Event\ConnectionEventArgs;
use Doctrine\DBAL\Events;
Modified: trunk/framework/Bee/Persistence/Doctrine2/DaoBase.php
===================================================================
--- trunk/framework/Bee/Persistence/Doctrine2/DaoBase.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/Doctrine2/DaoBase.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,12 +1,26 @@
<?php
namespace Bee\Persistence\Doctrine2;
+/*
+ * Copyright 2008-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
use Bee_Persistence_IOrderAndLimitHolder;
use Bee_Persistence_IRestrictionHolder;
use Bee_Utils_Strings;
use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
use Exception;
-use Logger;
/**
* User: mp
@@ -16,21 +30,6 @@
class DaoBase extends EntityManagerHolder {
/**
- * @var Logger
- */
- protected $log;
-
- /**
- * @return Logger
- */
- protected function getLog() {
- if (!$this->log) {
- $this->log = Logger::getLogger(get_class($this));
- }
- return $this->log;
- }
-
- /**
* @param QueryBuilder $queryBuilder
* @param Bee_Persistence_IRestrictionHolder $restrictionHolder
* @param Bee_Persistence_IOrderAndLimitHolder $orderAndLimitHolder
Modified: trunk/framework/Bee/Persistence/Doctrine2/DaoUtils.php
===================================================================
--- trunk/framework/Bee/Persistence/Doctrine2/DaoUtils.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/Doctrine2/DaoUtils.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,7 +1,7 @@
<?php
namespace Bee\Persistence\Doctrine2;
/*
- * Copyright 2008-2010 the original author or authors.
+ * Copyright 2008-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: trunk/framework/Bee/Persistence/Doctrine2/EntityManagerHolder.php
===================================================================
--- trunk/framework/Bee/Persistence/Doctrine2/EntityManagerHolder.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/Doctrine2/EntityManagerHolder.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,7 +1,7 @@
<?php
namespace Bee\Persistence\Doctrine2;
/*
- * Copyright 2008-2010 the original author or authors.
+ * Copyright 2008-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
* limitations under the License.
*/
use \Doctrine\ORM\EntityManager;
+use Logger;
/**
* User: mp
@@ -26,6 +27,21 @@
class EntityManagerHolder {
/**
+ * @var Logger
+ */
+ protected $log;
+
+ /**
+ * @return Logger
+ */
+ public function getLog() {
+ if (!$this->log) {
+ $this->log = Logger::getLogger(get_class($this));
+ }
+ return $this->log;
+ }
+
+ /**
* @var EntityManager
*/
private $entityManager;
Modified: trunk/framework/Bee/Persistence/Doctrine2/Log4PHPLogger.php
===================================================================
--- trunk/framework/Bee/Persistence/Doctrine2/Log4PHPLogger.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/Doctrine2/Log4PHPLogger.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,8 +1,7 @@
<?php
namespace Bee\Persistence\Doctrine2;
-
/*
- * Copyright 2008-2010 the original author or authors.
+ * Copyright 2008-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: trunk/framework/Bee/Persistence/Doctrine2/Types/EnumType.php
===================================================================
--- trunk/framework/Bee/Persistence/Doctrine2/Types/EnumType.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/Doctrine2/Types/EnumType.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,5 +1,20 @@
<?php
namespace Bee\Persistence\Doctrine2\Types;
+/*
+ * Copyright 2008-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\Type;
Modified: trunk/framework/Bee/Persistence/Exception/DataAccess.php
===================================================================
--- trunk/framework/Bee/Persistence/Exception/DataAccess.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/Exception/DataAccess.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 2008-2010 the original author or authors.
+ * Copyright 2008-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,5 +20,3 @@
parent::__construct($message, $cause);
}
}
-
-?>
\ No newline at end of file
Modified: trunk/framework/Bee/Persistence/IOrderAndLimitHolder.php
===================================================================
--- trunk/framework/Bee/Persistence/IOrderAndLimitHolder.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/IOrderAndLimitHolder.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,4 +1,19 @@
<?php
+/*
+ * Copyright 2008-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
interface Bee_Persistence_IOrderAndLimitHolder {
@@ -33,5 +48,3 @@
public function setCurrentPage($currentPage);
}
-
-?>
\ No newline at end of file
Modified: trunk/framework/Bee/Persistence/IRestrictionHolder.php
===================================================================
--- trunk/framework/Bee/Persistence/IRestrictionHolder.php 2014-07-27 11:59:43 UTC (rev 195)
+++ trunk/framework/Bee/Persistence/IRestrictionHolder.php 2014-07-27 12:44:42 UTC (rev 196)
@@ -1,4 +1,19 @@
<?php
+/*
+ * Copyright 2008-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
interface Bee_Persistence_IRestrictionHolder {
@@ -18,5 +33,3 @@
public function getFieldRestrictions();
}
-
-?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|