[Sungrazr-svn] [97] Sungrazr_Docs_Phpdoc: [NEW] Extension to Solar' s Phpdoc parser to support some custom introspection-related tags for Sungrazr_Server .

0 views
Skip to first unread message

cl...@killersoft.com

unread,
Dec 18, 2007, 2:01:16 AM12/18/07
to Sungra...@googlegroups.com
Revision
97
Author
clay
Date
2007-12-17 23:01:15 -0800 (Mon, 17 Dec 2007)

Log Message

Sungrazr_Docs_Phpdoc: [NEW] Extension to Solar's Phpdoc parser to support some custom introspection-related tags for Sungrazr_Server.

Added Paths

Diff

Added: trunk/Sungrazr/Docs/Phpdoc.php (0 => 97)


--- trunk/Sungrazr/Docs/Phpdoc.php	                        (rev 0)
+++ trunk/Sungrazr/Docs/Phpdoc.php	2007-12-18 07:01:15 UTC (rev 97)
@@ -0,0 +1,41 @@
+<?php
+/**
+ * 
+ * Extension to Solar's Phpdoc Docblock parser to support Sungrazr_Server_Api
+ * docblock tags.
+ * 
+ * Developed for, and then donated by, Mashery.com <http://mashery.com>.
+ * 
+ * @category Sungrazr
+ * 
+ * @package Sungrazr_Docs
+ * 
+ * @author Clay Loveless <cl...@killersoft.com>
+ * 
+ * @license http://opensource.org/licenses/bsd-license.php BSD
+ * 
+ * @version SVN: $Id$
+ *
+ */
+class Sungrazr_Docs_Phpdoc extends Solar_Docs_Phpdoc {
+        
+    /**
+     * 
+     * Parses one @supports line into $this->_info. Allows a RESTful API 
+     * to delcare what HTTP methods it supports.
+     * 
+     * @param string $line The block line.
+     * 
+     * @return void
+     * 
+     */
+    public function parseSupports($line)
+    {
+        $supports = explode(',', $line);
+        $methods = array();
+        foreach ($supports as $method) {
+            $methods[] = strtoupper(trim($method));
+        }
+        $this->_info['supports'] = $methods;
+    }   
+}
\ No newline at end of file
Property changes on: trunk/Sungrazr/Docs/Phpdoc.php
___________________________________________________________________
Name: svn:keywords
   + Id
Reply all
Reply to author
Forward
0 new messages