Solução Gráfica Design SGD
[ class tree: SGD ] [ index: SGD ] [ all elements ]

Class: RRSerror

Source Location: /RSSerror.php

Class Overview

easyRSS
   |
   --RRSerror

Generates a rss feed from the php error log file.


Author(s):

Version:

  • $Revision: 1.13 $

Variables

Methods



Class Details

[line 82]
Generates a rss feed from the php error log file.

Features:

  • XML 2.0 compatible
  • Shows the error line and some lines of source code.
  • Protected with password.
  • Generates link for edition of php file in developer machine (Best result with Firefox 2.0 e sage extension).
USASE: Create a file with a name secret or deceiving (ex: listimages.php ) and put this code below.
  1.   include_once('RSSerror.php');
  2.  
  3.   $args  array"root"        => "/home/user/public_html/",
  4.                   "local"       => "file:///C:/Documents%20and%20Settings/User/My%20Documents/My%20site/",
  5.                   "log"         => "/home/user/var/error_log",
  6.                   "url"         => "http://www.user.com.br/",
  7.                   "lines"       => 5,
  8.                   "password"    => "123456"
  9.                 );
  10.  
  11.  $param array"encoding"    => "UTF-8",
  12.                  "language"    => "pt-BR",
  13.                  "title"       => "Error Report for www.user.com.br",
  14.                  "description" => "Please corrects some errors occurred in the site www.user.com.br",
  15.                  "stylesheet"  => "http://www.user.com.br/rsserror.css",
  16.                  "link"        => "http://www.user.com.br/"
  17.                );
  18.  $rss new RRSerror($args$param);
in your feeds agregador, call the file of that sorts things out: http://www.domain.com/listimages.php?p=123456




Tags:

author:  Antonio Jozzolino <info@sgd.com.br>
version:  $Revision: 1.13 $
see:  http://www.sgd.com.br
link:  http://www.sgd.com.br/images/class_RSSerror.png Google Reader screenshot
link:  http://www.phpclasses.org/browse/package/3543.html phpclasses.org package
link:  http://www.sgd.com.br/content/view/26/88888890/ Monitorando erros em sites PHP via RSS
todo:  Create a way to turn application secure, specifically to encrypt the xml code generated.
todo:  To do xml code more compatible with RSS readers like Google Reader.
since:  2006/11/21 17:34:32
access:  public
example:  How to use this class.


[ Top ]


Class Variables

$args = array("root"        => "/home/www/",
                         "local"       => "file:///C:/Documents%20and%20Settings/Antonio%20Jozzolino/My%20Documents/My%20site/",
                     "log"         => "/home/var/logs/.error_log",
                     "url"         => "http://www.sgd.com.br/",
                      "lines"       => 5,
                      "password"    => "xxxxxx"
                           )

[line 94]

Necessary parameters for the class RSSerror



Tags:

var:  key["root"] Path of home directory of your site in UNIX format.
access:  public

Type:   string


[ Top ]

$param = array("encoding"    => "UTF-8",
                      "language"    => "pt-BR",
                     "title"       => "Error Report for www.sgd.com.br",
                     "description" => "Please corrects some errors occurred in the site www.sgd.com.br",
                     "stylesheet"  => "http://www.sgd.com.br/includes/class_RSSerror/rsserror.css",
                     "link"        => "http://www.sgd.com.br/"
                          )

[line 112]

Necessary parameters for the class easyRSS



Tags:

var:  key["encoding"] Default is UTF-8.
access:  public

Type:   string


[ Top ]

$root =

[line 125]

This var save old value off $args["root"]



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


constructor RRSerror [line 138]

string RRSerror( array $args, array $param)

Constructor function.

This function opens the log file, it extracts the information passing them for an array, setting up the ítens of the file rss. In the end, it calls the function easy RSS and it prints the xml file .




Tags:

return:  xml/rss file format
since:  2006/11/23 13:39:13


Parameters:

array   $args   [$args] Necessary parameters for the class RSSerror
array   $param   [$param] Necessary parameters for the class easyRSS

[ Top ]

method data [line 254]

integer data( string $line)

This function catches the date in the log file and it returns converted in the format of the UNIX.



Tags:

return:  UNIX timestamp date format
since:  2006/11/23 12:36:36


Parameters:

string   $line   [$line] Line of log file

[ Top ]

method description [line 215]

string description( string $line)

This function returns part of the source code with the line that presented error.



Tags:

return:  HTML formated source code
since:  2006/11/23 12:36:36


Parameters:

string   $line   [$line] Line of log file

[ Top ]

method links [line 270]

string links( string $line, bolean 1)

This function returns the physical path or the url of the file that it presented errors.



Tags:

return:  It returns url file or file fisical path if false
since:  2006/11/23 11:30:08


Parameters:

bolean   1   [$default] Key to choose the return value
string   $line   [$line] Line of log file

[ Top ]

method title [line 203]

string title( string $line)

This function returns PHP error type.



Tags:

return:  PHP error type
since:  2006/11/23 12:36:36


Parameters:

string   $line   [$line] Line of log file

[ Top ]


Documentation generated on Wed, 06 Aug 2008 12:59:17 -0300 by phpDocumentor 1.4.1