Re: Module development for PHP3
| From: | Rasmus Lerdorf | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Module development for PHP3 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-3309@lists.php.net to get a copy of this message | ||
> As of today I started the process of porting the internal script language of
> the webinterface to the DNews news-server software (
> http://dnews.kyber.dk/ )
> to a PHP3 module.
>
> This will enable users to build a PHP3 web interface to a news server. First
> goal is to integrate DNews with PHP, since they have been kind enough to give
> me their source :-), but as soon as that is running, I want to expand it to a
> more genreic set of functions. I plan to keep the module fairly generic :-).
>
> I have two questions in this regard:
>
> 1) Do I _need_ access to the CVS tree for this? (This is my first PHP3 module,
> so I'm basically in the dark ;-)
>
> 2) Is there any naming convention you'd prefer? I was thinking of news_<cmd>()
> for the generic function (connect, read a post etc) and news_<server>_<cmd>
> for server specific functions. Examples might be:
>
> Connect to news server:
> refpointer news_dnews_connect(ip [,user [,passwd] ] );
> refpointer news_inn_connect(ip [,user [,passwd] ] );
>
> Get ID of last post:
> postid news_lastpost(refpointer, group);
>
> Read header block:
> array news_headers(refpointer, postid);
>
> So connecting to a DNews newsserver (news.kyber.dk) as user "guru" with
> password "secret" and reading the header of last posting into an array
> "harray" would be like:
>
> ...
> newsid = news_dnews_connect("news.kyber.dk", "guru", "secret");
> last = news_lastpost(newsid, "kyber.develop.test");
> harray = news_headers(newsid, last);
> ...
>
> Is this acceptable?
Questions like these should be directed at php-dev@lists.php.net.
To answer your question. No, you don't really need CVS access for this.
At least not initially. Once you have some working code and it seems like
it would be a useful thing to add to the main PHP distribution, we will
get you set up with a CVS account and you can maintain it. As for the
naming convention, it seems ok to me.
A question though. What does this stuff do that the imap module's NNTP
mode doesn't do?
-Rasmus
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net