AS2Secure
[ class tree: AS2Secure ] [ index: AS2Secure ] [ all elements ]

Class: AS2Log

Source Location: /AS2Log.php

Class Overview


AS2Secure - PHP Lib for AS2 message encoding / decoding


Author(s):

Version:

  • 0.9.0

Copyright:

  • Copyright (c) 2010, Sebastien MALOT

    Last release at : http://www.as2secure.com

    This file is part of AS2Secure Project.

    AS2Secure is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

    AS2Secure is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along with AS2Secure.

Variables

Constants

Methods



Class Details

[line 32]
AS2Secure - PHP Lib for AS2 message encoding / decoding



Tags:

author:  Sebastien MALOT <contact@as2secure.com>
version:  0.9.0
copyright:  

Copyright (c) 2010, Sebastien MALOT

Last release at : http://www.as2secure.com

This file is part of AS2Secure Project.

AS2Secure is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

AS2Secure is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with AS2Secure.

license:  GNU General Public License


[ Top ]


Class Variables

static $current_message_id =  ''

[line 43]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $filename =  'events.log'

[line 33]



Tags:

access:  public

Type:   mixed


[ Top ]

static $stack = array()

[line 35]



Tags:

access:  protected

Type:   mixed


[ Top ]

$code =  0

[line 47]



Tags:

access:  protected

Type:   mixed


[ Top ]

$level =  self::INFO

[line 48]



Tags:

access:  protected

Type:   mixed


[ Top ]

$message =  ''

[line 46]



Tags:

access:  protected

Type:   mixed


[ Top ]

$message_id =  ''

[line 45]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


static method error [line 147]

static void error( string $message_id, string $message, [int $code = 0])

Static handler for error level



Tags:

access:  public


Parameters:

string   $message_id   The current message id (from mime message)
string   $message   The message to log
int   $code   The code number

[ Top ]

static method getCount [line 191]

static array getCount( [string $level = null])

Return the stack of log for a specific level (or not)



Tags:

return:  The current stack of logs
access:  public


Parameters:

string   $level   The level to search for

[ Top ]

static method getLastLogEvents [line 215]

static string getLastLogEvents( [int $count = 40], [boolean $reverse = true])

Return the lasts logs from logfile (work only on unix systems)



Tags:

access:  public


Parameters:

int   $count   The count of log lines
boolean   $reverse   To reverse order of log lines

[ Top ]

static method getStack [line 173]

static array getStack( [string $level = null])

Return the stack of log for a specific level (or not)



Tags:

return:  The current stack of logs
access:  public


Parameters:

string   $level   The level to search for

[ Top ]

static method handleLevel [line 159]

static void handleLevel( string $level, string $message_id, string $message, [int $code = 0])

Static and generic handler



Tags:

access:  public


Parameters:

string   $level   The level
string   $message_id   The current message id (from mime message)
string   $message   The message to log
int   $code   The code number

[ Top ]

static method hasError [line 200]

static boolean hasError( )

Indicate if there is errors into the stack



Tags:

access:  public


[ Top ]

static method info [line 125]

static void info( string $message_id, string $message, [int $code = 0])

Static handler for info level



Tags:

access:  public


Parameters:

string   $message_id   The current message id (from mime message)
string   $message   The message to log
int   $code   The code number

[ Top ]

static method warning [line 136]

static void warning( string $message_id, string $message, [int $code = 0])

Static handler for warning level



Tags:

access:  public


Parameters:

string   $message_id   The current message id (from mime message)
string   $message   The message to log
int   $code   The code number

[ Top ]

constructor __construct [line 55]

AS2Log __construct( $message, [ $code = 0], [ $level = self::INFO])

Contructor



Tags:

access:  protected


Parameters:

   $message  
   $code  
   $level  

[ Top ]

method getCode [line 105]

int getCode( )

Return the code



Tags:

access:  public


[ Top ]

method getLevel [line 114]

string getLevel( )

Return the level



Tags:

access:  public


[ Top ]

method getMessage [line 96]

string getMessage( )

Return the message



Tags:

access:  public


[ Top ]

method getMessageId [line 87]

string getMessageId( )

Return the message id (from mime part)



Tags:

access:  public


[ Top ]

method logEvent [line 69]

void logEvent( object $event, [ $log_message_id = true])

Log event into a file



Tags:

access:  protected


Parameters:

object   $event   The event to log into file
   $log_message_id  

[ Top ]


Class Constants

ERROR =  'error'

[line 38]


[ Top ]

FAILURE =  'failure'

[line 40]


[ Top ]

INFO =  'info'

[line 37]


[ Top ]

WARNING =  'warning'

[line 39]


[ Top ]



Documentation generated on Wed, 03 Nov 2010 22:51:30 +0100 by phpDocumentor 1.4.3