[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of eZPaymentLogger class 4 // 5 // Created on: <11-Jun-2004 14:18:58 dl> 6 // 7 // SOFTWARE NAME: eZ publish 8 // SOFTWARE RELEASE: 3.9.0 9 // BUILD VERSION: 17785 10 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 11 // SOFTWARE LICENSE: GNU General Public License v2.0 12 // NOTICE: > 13 // This program is free software; you can redistribute it and/or 14 // modify it under the terms of version 2.0 of the GNU General 15 // Public License as published by the Free Software Foundation. 16 // 17 // This program is distributed in the hope that it will be useful, 18 // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 // GNU General Public License for more details. 21 // 22 // You should have received a copy of version 2.0 of the GNU General 23 // Public License along with this program; if not, write to the Free 24 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 // MA 02110-1301, USA. 26 // 27 // 28 29 /*! \file ezpaymentlogger.php 30 */ 31 32 /*! 33 \class eZPaymentLogger 34 */ 35 36 class eZPaymentLogger 37 { 38 function eZPaymentLogger( $fileName, $mode ) 39 { 40 $this->file = fopen( $fileName, $mode ); 41 } 42 43 function &CreateNew($fileName) 44 { 45 $theLogger = new eZPaymentLogger( $fileName, "wt" ); 46 return $theLogger; 47 } 48 49 function &CreateForAdd($fileName) 50 { 51 $theLogger = new eZPaymentLogger( $fileName, "a+t" ); 52 return $theLogger; 53 } 54 55 function writeString( $string, $label='' ) 56 { 57 if( $this->file ) 58 { 59 if ( is_object( $string ) || is_array( $string ) ) 60 $string = eZDebug::dumpVariable( $string ); 61 62 if( $label == '' ) 63 fputs( $this->file, $string."\r\n" ); 64 else 65 fputs( $this->file, $label . ': ' . $string."\r\n" ); 66 } 67 } 68 69 function writeTimedString( $string, $label='' ) 70 { 71 if( $this->file ) 72 { 73 $time = $this->getTime(); 74 75 if ( is_object( $string ) || is_array( $string ) ) 76 $string = eZDebug::dumpVariable( $string ); 77 78 if( $label == '' ) 79 fputs( $this->file, $time. ' '. $string. "\n" ); 80 else 81 fputs( $this->file, $time. ' '. $label. ': '. $string. "\n" ); 82 } 83 } 84 85 function getTime() 86 { 87 $time = strftime( "%d-%m-%Y %H-%M" ); 88 return $time; 89 } 90 91 var $file; 92 } 93 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |