Author: ornicar2
Date: 2010-02-03 11:18:10 +0100 (Wed, 03 Feb 2010)
New Revision: 27480

Modified:
   plugins/diemPlugin/trunk/dmCorePlugin/lib/config/dmProjectConfiguration.php
   
plugins/diemPlugin/trunk/dmCorePlugin/lib/doctrine/extension/DmGallery/Template/DmGallery.php
   plugins/diemPlugin/trunk/dmCorePlugin/lib/doctrine/table/dmDoctrineTable.php
   plugins/diemPlugin/trunk/dmCorePlugin/lib/project/dmProject.php
Log:
[Diem]
- cleaned project configuration class
- fixed DmGallery->addMedia()

Modified: 
plugins/diemPlugin/trunk/dmCorePlugin/lib/config/dmProjectConfiguration.php
===================================================================
--- plugins/diemPlugin/trunk/dmCorePlugin/lib/config/dmProjectConfiguration.php 
2010-02-03 09:22:49 UTC (rev 27479)
+++ plugins/diemPlugin/trunk/dmCorePlugin/lib/config/dmProjectConfiguration.php 
2010-02-03 10:18:10 UTC (rev 27480)
@@ -47,13 +47,8 @@
   public function configureDoctrine(Doctrine_Manager $manager)
   {
     Doctrine_Core::debug(sfConfig::get('dm_debug'));
-
+    
     /*
-     * Set up doctrine extensions dir
-     */
-    
//Doctrine_Core::setExtensionsPath(sfConfig::get('dm_core_dir').'/lib/doctrine/extension');
-
-    /*
      * Configure inheritance
      */
     $manager->setAttribute(Doctrine_Core::ATTR_TABLE_CLASS, 'myDoctrineTable');

Modified: 
plugins/diemPlugin/trunk/dmCorePlugin/lib/doctrine/extension/DmGallery/Template/DmGallery.php
===================================================================
--- 
plugins/diemPlugin/trunk/dmCorePlugin/lib/doctrine/extension/DmGallery/Template/DmGallery.php
       2010-02-03 09:22:49 UTC (rev 27479)
+++ 
plugins/diemPlugin/trunk/dmCorePlugin/lib/doctrine/extension/DmGallery/Template/DmGallery.php
       2010-02-03 10:18:10 UTC (rev 27480)
@@ -1,23 +1,4 @@
 <?php
-/*
- *  $Id$
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * This software consists of voluntary contributions made by many individuals
- * and is licensed under the LGPL. For more information, see
- * <http://www.phpdoctrine.org>.
- */
 
 /**
  * Add gallery capabilities to your models
@@ -67,7 +48,7 @@
   
   public function addMedia(DmMedia $media)
   {
-    $this->getDmGallery->add($media);
+    $this->getDmGallery()->add($media);
     
     return $this->_invoker;
   }

Modified: 
plugins/diemPlugin/trunk/dmCorePlugin/lib/doctrine/table/dmDoctrineTable.php
===================================================================
--- 
plugins/diemPlugin/trunk/dmCorePlugin/lib/doctrine/table/dmDoctrineTable.php    
    2010-02-03 09:22:49 UTC (rev 27479)
+++ 
plugins/diemPlugin/trunk/dmCorePlugin/lib/doctrine/table/dmDoctrineTable.php    
    2010-02-03 10:18:10 UTC (rev 27480)
@@ -506,7 +506,7 @@
   /*
    * dmMicroCache
    */
-  private
+  protected
   $cache;
 
   protected function getCache($cacheKey)

Modified: plugins/diemPlugin/trunk/dmCorePlugin/lib/project/dmProject.php
===================================================================
--- plugins/diemPlugin/trunk/dmCorePlugin/lib/project/dmProject.php     
2010-02-03 09:22:49 UTC (rev 27479)
+++ plugins/diemPlugin/trunk/dmCorePlugin/lib/project/dmProject.php     
2010-02-03 10:18:10 UTC (rev 27480)
@@ -4,11 +4,11 @@
 {
 
   protected static
-    $key,
-    $hash,
-    $models,
-    $allModels,
-    $dmModels;
+  $key,
+  $hash,
+  $models,
+  $allModels,
+  $dmModels;
 
   /*
    * Returns project key based on his dir_name
@@ -55,8 +55,8 @@
     if (null === self::$allModels)
     {
       $baseModels = sfFinder::type('file')
-      ->name("Base*.class.php")
-      ->in(dmOs::join(sfConfig::get("sf_lib_dir"), "model/doctrine"));
+      ->name('/^Base\w+.class.php$/i')
+      ->in(dmOs::join(sfConfig::get('sf_lib_dir'), 'model/doctrine'));
 
       self::$allModels = array();
       foreach($baseModels as $baseModel)
@@ -73,7 +73,7 @@
     if (null === self::$dmModels)
     {
       $baseModels = sfFinder::type('file')
-      ->name("Base*.class.php")
+      ->name('/Base\w+.class.php/i')
       ->maxDepth(0)
       ->in(dmOs::join(sfConfig::get("sf_lib_dir"), 
"model/doctrine/dmCorePlugin/base"));
 

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to