[pLog-svn] Confusing method naming

Jon Daley plogworld at jon.limedaley.com
Mon Apr 7 15:14:23 EDT 2008


 	Yeah, I wanted a getArticleByTitle the other day and noticed it 
was using the slug instead.  It is probably because they were added at 
different times.  Let's come up with a standard, and rename all of the 
functions across the board.
 	It doesn't seem like we can nicely deprecate 
getBlogArticleByTitle, since that is a pretty good name, so I think people 
will have to know that it now means title and not slug, and change their 
custom code accordingly.  Unless we really want to make sure to not break 
stuff, and come up with a new function name for getbytitle.

On Tue, 8 Apr 2008, Mark Wu wrote:

> Actually ...
>
> getBlogArticleByTitle() in articles.class.php means "get blog article by
> post slug"
>
> getCategoryByName() in articlecategories.class.php means "get article
> category by mangled name"
>
> It is really confusing :(
>

-- 
Jon Daley
http://jon.limedaley.com/

Maybe we're too stupid. Maybe there's an algorithm out there and
we're just not getting it. It's a possibility.
-- Professor Tygar


More information about the pLog-svn mailing list