List Info

Thread: Comment on Authentication::Auth_TypeKey




Comment on Authentication::Auth_TypeKey
user name
2006-05-29 18:14:32
Philippe Jausions (http://pear.php.net
/user/jausions) has commented on the proposal for
Authentication::Auth_TypeKey.

Comment:

Class properties shouldn't be all-caps. i.e. should be var
$baseURL instead
of $AUTH_TYPEKEY_BASEURL.

Docblocks starts with /** not /*

Create sub-classes for each math modules. i.e. one for GMP
and one for
BCMath. For instance Auth/TypeKey/GMP.php and
Auth/TypeKey/BCMath.php. The
extension to be used could be specified in the constructor.
This would
allow to run regression tests with both extensions.

I believe GMP is faster than BCMath but do some benchmarking
to determine
that, so the package can use the fastest extension
available.

No need to extend the PEAR class.

site_token() should be renamed to siteToken()

Use single-quotes ' instead of double-quotes " around
strings.

Remove space between name of function and
opening-parenthese. ie.
"function Auth_TypeKey($init = array())" instead
of "function Auth_TypeKey
( $init = array() )"

Use PEAR::loadExtension() instead of extension_loaded()

Constructor must NOT return anything.

Correct indentations to 4-space, for instance in
"switch" block of
verifyTypeKey()

Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=164

-- 
Sent by PEPr, the automatic proposal system at http://pear.php.net

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

Comment on Authentication::Auth_TypeKey
user name
2006-05-29 20:02:40
On 29 May 2006 18:14:32 -0000, Philippe Jausions
<Philippe.Jausions11abacus.com> wrote:
>
> Philippe Jausions (http://pear.php.net
/user/jausions) has commented on the proposal for
Authentication::Auth_TypeKey.
>
> No need to extend the PEAR class.
>

Extending the PEAR class can be ok, especially if a package
throws any
errors as it allows expectError to be  used.

-- 
Justin Patrin

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )