[Solar-svn] Revision 2859

pmjones at solarphp.com pmjones at solarphp.com
Fri Oct 12 11:41:24 CDT 2007


updated comments


Added: trunk/Solar/Model/Nodes/Bookmarks/Collection.php
===================================================================
--- trunk/Solar/Model/Nodes/Bookmarks/Collection.php	                        (rev 0)
+++ trunk/Solar/Model/Nodes/Bookmarks/Collection.php	2007-10-12 16:41:24 UTC (rev 2859)
@@ -0,0 +1,27 @@
+<?php
+/**
+ * 
+ * A collection of records from the "bookmarks" model.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Model
+ * 
+ * @author Paul M. Jones <pmjones at solarphp.com>
+ * 
+ * @license http://opensource.org/licenses/bsd-license.php BSD
+ * 
+ * @version $Id: Exception.php 2804 2007-10-06 14:01:27Z pmjones $
+ * 
+ */
+
+/**
+ * 
+ * A collection of records from the "bookmarks" model.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Model
+ * 
+ */
+class Solar_Model_Nodes_Bookmarks_Collection extends Solar_Sql_Model_Nodes_Collection {}
\ No newline at end of file

Modified: trunk/Solar/Model/Nodes/Bookmarks/Record.php
===================================================================
--- trunk/Solar/Model/Nodes/Bookmarks/Record.php	2007-10-12 16:00:55 UTC (rev 2858)
+++ trunk/Solar/Model/Nodes/Bookmarks/Record.php	2007-10-12 16:41:24 UTC (rev 2859)
@@ -1,5 +1,42 @@
 <?php
+/**
+ * 
+ * A single record from the "bookmarks" model.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Model
+ * 
+ * @author Paul M. Jones <pmjones at solarphp.com>
+ * 
+ * @license http://opensource.org/licenses/bsd-license.php BSD
+ * 
+ * @version $Id: Exception.php 2804 2007-10-06 14:01:27Z pmjones $
+ * 
+ */
+
+/**
+ * 
+ * A single record from the "bookmarks" model.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Model
+ * 
+ */
 class Solar_Model_Nodes_Bookmarks_Record extends Solar_Model_Nodes_Record {
+    
+    /**
+     * 
+     * Returns a pre-populated Solar_Form object.
+     * 
+     * Uses only these columns:  uri, subj, summ, tags_as_string, and pos.
+     * 
+     * @param array $cols Ignored.
+     * 
+     * @return Solar_Form
+     * 
+     */
     public function form($cols = null)
     {
         // force the columns to be shown in the form

Modified: trunk/Solar/Model/Nodes/Bookmarks.php
===================================================================
--- trunk/Solar/Model/Nodes/Bookmarks.php	2007-10-12 16:00:55 UTC (rev 2858)
+++ trunk/Solar/Model/Nodes/Bookmarks.php	2007-10-12 16:41:24 UTC (rev 2859)
@@ -1,5 +1,38 @@
 <?php
+/**
+ * 
+ * A model of nodes used as bookmarks.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Model
+ * 
+ * @author Paul M. Jones <pmjones at solarphp.com>
+ * 
+ * @license http://opensource.org/licenses/bsd-license.php BSD
+ * 
+ * @version $Id: Mime.php 2826 2007-10-06 15:55:03Z pmjones $
+ * 
+ */
+
+/**
+ * 
+ * A model of nodes used as bookmarks.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Model
+ * 
+ */
 class Solar_Model_Nodes_Bookmarks extends Solar_Model_Nodes {
+    
+    /**
+     * 
+     * Model setup.
+     * 
+     * @return void
+     * 
+     */
     protected function _setup()
     {
         parent::_setup();

Modified: trunk/Solar/Model/Nodes/Record.php
===================================================================
--- trunk/Solar/Model/Nodes/Record.php	2007-10-12 16:00:55 UTC (rev 2858)
+++ trunk/Solar/Model/Nodes/Record.php	2007-10-12 16:41:24 UTC (rev 2859)
@@ -1,6 +1,38 @@
 <?php
+/**
+ * 
+ * A single record from the "nodes" model.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Model
+ * 
+ * @author Paul M. Jones <pmjones at solarphp.com>
+ * 
+ * @license http://opensource.org/licenses/bsd-license.php BSD
+ * 
+ * @version $Id: Exception.php 2804 2007-10-06 14:01:27Z pmjones $
+ * 
+ */
+
+/**
+ * 
+ * A single record from the "nodes" model.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Model
+ * 
+ */
 class Solar_Model_Nodes_Record extends Solar_Model_Record {
     
+    /**
+     * 
+     * Magic method to get the 'tags_as_string' property.
+     * 
+     * @return string
+     * 
+     */
     public function __getTagsAsString()
     {
         // if exactly null, populate for the first time.
@@ -15,6 +47,15 @@
         return $this->_data['tags_as_string'];
     }
     
+    /**
+     * 
+     * Magic method to set the 'tags_as_string' property.
+     * 
+     * @param string $val A space-separated list of tags.
+     * 
+     * @return void
+     * 
+     */
     public function __setTagsAsString($val)
     {
         $val = preg_replace('/[ ]{2,}/', ' ', $val);
@@ -35,8 +76,13 @@
         $this->tags = $coll;
     }
     
-    // work with related values before they get saved.
-    // relateds:  areas, nodes, taggings, tags
+    /**
+     * 
+     * Corrects and saves related records and collections.
+     * 
+     * @return void
+     * 
+     */
     public function _postSave()
     {
         // -------------------------------------------------------------

Modified: trunk/Solar/Model/Taggings.php
===================================================================
--- trunk/Solar/Model/Taggings.php	2007-10-12 16:00:55 UTC (rev 2858)
+++ trunk/Solar/Model/Taggings.php	2007-10-12 16:41:24 UTC (rev 2859)
@@ -1,7 +1,7 @@
 <?php
 /**
  * 
- * A model of content "nodes" (individual pieces of content).
+ * A model of content "taggings" (maps tags to nodes).
  * 
  * @category Solar
  * 
@@ -17,7 +17,7 @@
 
 /**
  * 
- * A model of content "nodes" (individual pieces of content).
+ * A model of content "taggings" (maps tags to nodes).
  * 
  * @category Solar
  * 
@@ -25,6 +25,14 @@
  * 
  */
 class Solar_Model_Taggings extends Solar_Model {
+    
+    /**
+     * 
+     * Model setup.
+     * 
+     * @return void
+     * 
+     */
     protected function _setup()
     {
         $this->_table_name = 'taggings';

Modified: trunk/Solar/Model/Tags/Collection.php
===================================================================
--- trunk/Solar/Model/Tags/Collection.php	2007-10-12 16:00:55 UTC (rev 2858)
+++ trunk/Solar/Model/Tags/Collection.php	2007-10-12 16:41:24 UTC (rev 2859)
@@ -1,12 +1,50 @@
 <?php
+/**
+ * 
+ * A collection of records from the "tags" model.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Model
+ * 
+ * @author Paul M. Jones <pmjones at solarphp.com>
+ * 
+ * @license http://opensource.org/licenses/bsd-license.php BSD
+ * 
+ * @version $Id: Exception.php 2804 2007-10-06 14:01:27Z pmjones $
+ * 
+ */
+
+/**
+ * 
+ * A collection of records from the "tags" model.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Model
+ * 
+ */
 class Solar_Model_Tags_Collection extends Solar_Model_Collection {
     
+    /**
+     * 
+     * Gets the names of all tags in this collection as an array.
+     * 
+     * @return array
+     * 
+     */
     public function getNames()
     {
+        // use a clone so we don't screw up other iterators
+        $clone = clone($this);
+        
+        // build the list
         $list = array();
-        foreach ($this as $tag) {
+        foreach ($clone as $tag) {
             $list[] = $tag->name;
         }
+        
+        // done!
         return $list;
     }
 }
\ No newline at end of file

Modified: trunk/Solar/Model/Tags/Record.php
===================================================================
--- trunk/Solar/Model/Tags/Record.php	2007-10-12 16:00:55 UTC (rev 2858)
+++ trunk/Solar/Model/Tags/Record.php	2007-10-12 16:41:24 UTC (rev 2859)
@@ -1,2 +1,27 @@
 <?php
+/**
+ * 
+ * A single record from the "tags" model.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Model
+ * 
+ * @author Paul M. Jones <pmjones at solarphp.com>
+ * 
+ * @license http://opensource.org/licenses/bsd-license.php BSD
+ * 
+ * @version $Id: Exception.php 2804 2007-10-06 14:01:27Z pmjones $
+ * 
+ */
+
+/**
+ * 
+ * A single record from the "tags" model.
+ * 
+ * @category Solar
+ * 
+ * @package Solar_Model
+ * 
+ */
 class Solar_Model_Tags_Record extends Solar_Model_Record {}
\ No newline at end of file




More information about the Solar-svn mailing list