Scriptindex.de

[ Menü ]

Home
News
Scripts
Neuzugänge
Suchen
Bücher
Manuals

[ Inhalt ]

Script eintragen
Tutorial eintragen
Newsletter
Umfragen
Link zu uns
Werbung bei uns
Kontakt
Impressum

[ Statistik ]

Hits gesamt: 5202349
Hits Heute: 452
max. Hits (10.07.07): 6964
User Online: 31
Scripts: 2828

[ Partner ]

CodeBase
I.S.U.M.
LUG Bayreuth
PEAR NEWS
PHP Classes

[ Facebook ]

[ Eigene Domain? ]

[ Buchtipp ]

Lösungsorientiertes Programmieren mit C++.
Lösungsorientiertes Programmieren mit C++.

Manuals > PEAR > Log::singleton()

Log::singleton()

Log::singleton() -- 

Description

Returns a reference to a concrete Log instance of log_type, only creating a new instance if no Log instance with the same parameters currently exists.

You should use this if there are multiple places you might create a logger, you don't want to create multiple loggers, and you don't want to check for the existance of one each time. The singleton pattern does all the checking work for you.

Note: You MUST call this method with the $var = &Log::singleton()syntax. Without the ampersand (&) in front of the method name, you will not get a reference; you will get a copy.

Return value

object - the newly created concrete Log instance, or an FALSE on an error.

Note

This function can be called statically.


Copyright 1998 - 2009 by I.S.U.M.