From 716c3a5a3a36206e93431eb5f8df3471546ec4b2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 4 Sep 2011 20:42:32 -0400 Subject: start to add a plugin management framework --- src/lib/ContactMethod.class.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/lib/ContactMethod.class.php') diff --git a/src/lib/ContactMethod.class.php b/src/lib/ContactMethod.class.php index c01374e..b01e7d3 100644 --- a/src/lib/ContactMethod.class.php +++ b/src/lib/ContactMethod.class.php @@ -16,20 +16,15 @@ class ContactMethod { public function __construct($verb_slug, $addr_slug, $verb_text, $addr_text) { - $this->$verb_slug = $verb_slug; - $this->$addr_slug = $addr_slug; - $this->$verb_text = $verb_text; - $this->$addr_Text = $addr_text; + $this->verb_slug = $verb_slug; + $this->addr_slug = $addr_slug; + $this->verb_text = $verb_text; + $this->addr_text = $addr_text; global $CONTACT_METHODS; - $CONTACT_METHODS[$slug] = $this; + $CONTACT_METHODS[$verb_slug] = $this; } public function setHandler($handler) { - $this->$handler = $handler; + $this->handler = $handler; } } - -new ContactMethod('sms' , 'phone' , - 'text message', 'cell number' ); -new ContactMethod('email' , 'email' , - 'email' , 'email address'); -- cgit v1.2.3-2-g168b