TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Showing results 1 to 2 of 2
Search took 0.01 seconds.
Search: Posts Made By: Fordi
Forum: Advanced PHP Programming 08-25-2009, 07:06 PM
Replies: 27
Views: 122,880
Posted By Fordi
Oooo... session-level singleton. Not a bad idea,...

Oooo... session-level singleton. Not a bad idea, especially in the case of, for example, a User or Visitor model.

Still, your best bet with that is to store the class instance in the $_SESSION...
Forum: Advanced PHP Programming 08-25-2009, 07:01 PM
Replies: 27
Views: 122,880
Posted By Fordi
Something I'll usually do is overload the class...

Something I'll usually do is overload the class name with a function:

function Database() {
return Database::getInstance();
}


This, in combination with usually returning an object simplifies...
Showing results 1 to 2 of 2

 

All times are GMT. The time now is 04:38 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design