Author: ihabunek
Date: Thu Mar 29 08:40:59 2012
New Revision: 1306754

URL: http://svn.apache.org/viewvc?rev=1306754&view=rev
Log:
Improved phpdoc for FirePHP appender to be in line with project standards.

Modified:
    logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFirephp.php   
(contents, props changed)

Modified: logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFirephp.php
URL: 
http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFirephp.php?rev=1306754&r1=1306753&r2=1306754&view=diff
==============================================================================
--- logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFirephp.php 
(original)
+++ logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFirephp.php Thu 
Mar 29 08:40:59 2012
@@ -1,41 +1,34 @@
 <?php
-
 /**
- * LoggerAppenderFirephp
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
  *
- * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
- * license agreements. See the NOTICE file distributed with this work for
- * additional information regarding copyright ownership. The ASF licenses this
- * file to you 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.
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * PHP version 5
+ * 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.
  *
- * @category  Include
- * @package   LoggerAppenderFirephp
- * @author    Bruce Ingalls <Bruce.Ingalls-at-gmail-dot-com>
- * @copyright 2012 Apache Software Foundation
- * @license   Apache License, Version 2.0
- * @version   SVN: $Id:$
- * @link      
http://sourcemint.com/github.com/firephp/firephp/1:1.0.0b1rc6/-docs/Configuration/Constants
- * @link      
https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/FirePHPHandler.php
- * @see       LoggerAutoloader.php Update class list
- * @since     Feb 22, 2012
- * @internal  CodeSniffs as PEAR style, adapted to Apache. Phpmd clean.
- * @example   require_once 'FirePHP/Init.php'; //Must be declared before 
log4php
+ * @package log4php
  */
 
 /**
- * Connect Apache Log4php to Insight, the next version of FirePHP
- * Read the link at sourcemint, to <b>define</b> 4 INSIGHT_* constants in your 
php
+ * Logs messages as HTTP headers using the FirePHP Insight API.
+ * 
+ * This appender requires the FirePHP server library version 1.0 or later.
  * 
- * LoggerAppenderFirephp logs events by creating a PHP user-level message 
using the Browser-Extension FirePHP
+ * Configurable parameters of this appender are:
+ * - medium - (string) The target to which messages will be sent. Possible 
options are 
+ *            'page' (default), 'request', 'package' and 'controller'. For 
more details,
+ *            see FirePHP documentation.
+ * 
+ * This class was originally contributed by Bruce Ingalls 
(Bruce.Ingalls-at-gmail-dot-com).
  * 
  * An example php file:
  * 
@@ -45,48 +38,40 @@
  * 
  * {@example ../../examples/resources/appender_firephp.xml 18}
  * 
- * @package   LoggerAppenderFirephp
- * @author    Bruce Ingalls <Bruce.Ingalls-at-gmail-dot-com>
- * @copyright 2012 Apache Software Foundation
- * @license   Apache License, Version 2.0
- * @link      
http://sourcemint.com/github.com/firephp/firephp/1:1.0.0b1rc6/-docs/Configuration/Constants
+ * @link https://github.com/firephp/firephp FirePHP 1.0 homepage.
+ * @link 
http://sourcemint.com/github.com/firephp/firephp/1:1.0.0b1rc6/-docs/Welcome 
+ *       FirePHP documentation.
+ * @link 
http://sourcemint.com/github.com/firephp/firephp/1:1.0.0b1rc6/-docs/Configuration/Constants
+ *       FirePHP constants documentation.
+ * 
+ * @version $Revision$
+ * @package log4php
+ * @subpackage appenders
+ * @since 2.3
  */
 class LoggerAppenderFirephp extends LoggerAppender {
        
        /**
-        * 
-        * @var FirePHP instance of FirePHP-Console Client
+        * Instance of the Insight console class.
+        * @var Insight_Plugin_Console
         */
        protected $console;
        
        /**
-        * 
-        * where to write the log-message
-        * @var string possible values are: page, request, package, contoller, 
site, page
+        * The target for log messages. Possible values are: 'page' (default), 
+        * 'request', 'package' and 'contoller'.
         */
        protected $medium;
 
-       /**
-        * Enable
-        *
-        * @return void
-        */
        public function activateOptions() {
-               $this->console = $this->getConsole();
-               if (null === $this->console) {
-                       $this->warn('FirePHP is not installed correctly.');
+               $this->console = $this->getConsole();
+               if (null === $this->console) {
+                       $this->warn('FirePHP is not installed correctly.');
                }               
                
                $this->closed = true;
        }
 
-       /**
-        * Write event object to Log. Defaults to INFO level
-        *
-        * @param LoggerLoggingEvent this->consoleIncludes level & message
-        *
-        * @return void
-        */
        public function append(LoggerLoggingEvent $event) {
                $msg = $this->getLayout()->format($event);
                
@@ -121,38 +106,29 @@ class LoggerAppenderFirephp extends Logg
        }
 
        /**
-        * Get firephp display object
-        *
-        * @return object null, if FirePHP is unavailable
+        * Returns the FirePHP Insight console.
+        * @return Insight_Plugin_Console
         */
        private function getConsole() {
                if (isset($this->console)) {
                        return $this->console;
                }
                
-               if (method_exists('FirePHP', 'to')) {
-                       $inspector = FirePHP::to($this->getMedium());
-               
-                       return $inspector->console();
+               if (method_exists('FirePHP', 'to')) {
+                       $inspector = FirePHP::to($this->getMedium());
+               
+                       return $inspector->console();
                }
                
                return null;
        }
 
-       /**
-        * Get medium, typically 'page'
-        *
-        * @return string
-        */
+       /** Returns the medium. */
        public function getMedium() {
                return $this->medium;
        }
 
-       /**
-        * Sets medium. Defaults to 'page' for firebug console
-        *
-        * @param string $medium
-        */
+       /** Sets the medium. */
        public function setMedium($medium = 'page') {
                $this->setString('medium', $medium);
        }

Propchange: 
logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFirephp.php
------------------------------------------------------------------------------
    svn:keywords = Revision


Reply via email to