Zend_Service_Twitter constructor

2 messages Options
Embed this post
Permalink
Joe Czhlobatnik

Zend_Service_Twitter constructor

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

There are cases where Zend_Service_Twitter can be used without authentication, but the constructor requires $username and $password to always be passed. For example, checking if a given username exists or not:

$tw = new Zend_Service_Twitter(null);
$exists = $tw->user->show($who)->id() !== null;

Since the first parameter is required, I can't simply do this:

$tw = new Zend_Service_Twitter();

I'm thinking that both constructor parameters should be optional, in order to more cleanly support these anonymous uses. Does this seem reasonable?

Hotmail: Trusted email with powerful SPAM protection. Sign up now.
Pádraic Brady

Re: Zend_Service_Twitter constructor

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
It should be reasonable though it will subtly change the expected behaviour (might need to wait for a 1.10 release though it can be fixed in trunk now). Can you create an issue for this? If not - just ping me and I'll add an issue for you. The next bug hunt is around two weeks away so I'll look at it then if not already fixed at that time.

Paddy
 
Pádraic Brady

http://blog.astrumfutura.com
http://www.survivethedeepend.com
OpenID Europe Foundation Irish Representative



From: Joe Czhlobatnik <[hidden email]>
To: [hidden email]
Sent: Tue, November 3, 2009 6:56:17 PM
Subject: [fw-general] Zend_Service_Twitter constructor


There are cases where Zend_Service_Twitter can be used without authentication, but the constructor requires $username and $password to always be passed. For example, checking if a given username exists or not:

$tw = new Zend_Service_Twitter(null);
$exists = $tw->user->show($who)->id() !== null;

Since the first parameter is required, I can't simply do this:

$tw = new Zend_Service_Twitter();

I'm thinking that both constructor parameters should be optional, in order to more cleanly support these anonymous uses. Does this seem reasonable?

Hotmail: Trusted email with powerful SPAM protection. Sign up now.