briedis Posted October 24, 2009 Report Share Posted October 24, 2009 Kā nodrošināt, ka var izveidot tikai vienu instanci klasei(skripta ietvaros)? Lai šitā nevarētu izdarīt: $new1 = new MyClass(); $new2 = new MyClass(); Quote Link to comment Share on other sites More sharing options...
Kaklz Posted October 24, 2009 Report Share Posted October 24, 2009 Palasi par singleton design pattern. Quote Link to comment Share on other sites More sharing options...
briedis Posted October 24, 2009 Author Report Share Posted October 24, 2009 Palasi par singleton design pattern. Paldies! Gūglējot biju šim uzdūries, bet neiedziļinājos, jo nodomāju ka tā kāda bibliotēka vai kas cits ne-vienkāršs :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.