Old 18th March 2008, 04:49   #1
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,798
Send a message via AIM to ryan
PHP Registry Pattern.

So I've been reading about this pattern today. I'm trying to implement it into something I'm working on.

The thing is, I can't get it to work. (Even the examples on the page copied and pasted don't seem to work for me)

Here is the code I'm working with.

Can anyone point me in the right direction?
ryan is offline   Reply With Quote
Old 18th March 2008, 07:29   #2
zootm
Forum King
 
zootm's Avatar
 
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
What version of PHP are you using, and what error/behaviour are you getting?

zootm is offline   Reply With Quote
Old 18th March 2008, 13:46   #3
xzxzzx
Forum King
 
xzxzzx's Avatar
 
Join Date: Aug 2002
Posts: 7,254
I'm having this problem with my <blank>.

People tell me how to <blank>, and I do what they say, but then <blank> doesn't work. I don't know why.

Can you help me?

(Ryan: You should know better. You included the code. At least include the error you're getting. :P)

Freedom of speech is the basic freedom of humanity. When you've lost that, you've lost everything.
1\/\/4y 34|<$p4y 1gp4y 33714y, 0d4y 0uy4y? | Roses are #FF0000; Violets are #0000FF; chown -R ${YOU} ~/base
The DMCA. It really is that bad. : Count for your life.
xzxzzx is offline   Reply With Quote
Old 18th March 2008, 20:01   #4
zootm
Forum King
 
zootm's Avatar
 
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
My professional opinion is that PHP is so antithetical to good software engineering that it rejects design patterns like an incompatible donor heart, incidentally.

I suspect that you might be using a different version of PHP than the article was written for too.

zootm is offline   Reply With Quote
Old 19th March 2008, 02:39   #5
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,798
Send a message via AIM to ryan
I just noticed I posted this here. I was tired, give me a break. If someone wants to move it to GD, please do.



But on to the point.

The error is...
code:
Fatal error: Call to a member function bar() on a non-object in W:\www\reg_test.php on line 65


I've tried it on PHP 5.2.3 (my test server) and 5.2.4 (vague.us)

p.s. fuck you peter.

p.p.s I figured out the problem. I'm just a moron.

p.p.p.s http://pastebin.com/d70d6e8c0

Last edited by ryan; 19th March 2008 at 04:09.
ryan is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Community Center > Breaking News

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump