Presentation and question.
| From: | Leandro Lucarella | Date: | Wed, 22 Jan 2003 18:01:26 +0000 |
| Subject: | Presentation and question. | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-12688@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi! My name is Leandro Lucarella, I'm from Argentina and I have some
classes made for PHP that I'd like to migrate to be "PEAR Compilant" to
add them as PEAR packages. So my first question is where to add them (in
wich category). My classes are:
MP3 ID3 Tag: Sets and gets ID3 TAGs from MP3 files.
I thought it would be nice to put it on "File Formats" and
in file File/MP3/ID3.php.
http://www.phpclasses.org/goto/browse.html/package/171.html
Getopt Util: This is a utility to automatic show help messages and other
stuff to expand Console_Getopt capabilities.
I think "Console" category and Console/Getopt/Util.php woul
be great.
http://www.phpclasses.org/goto/browse.html/package/252.html
Simple DB: A class to make simple ABM, searching and Listing of a DB.
I thought I can put it on "Database" and DB/Simple.php and
DB/Simple/* (now it uses DB and I'm thinking about making
it in make it a subclass of DB).
This is not public available yet.
Permissions: This is a class to set permissions based on phplib (with
bit operations).
I don't know where it can be, maybe in "Authentication"?
and in Auth/Perm.php? I don't know if it's right.
This is not public available yet.
Hooks: Well this is hard to explain. This is like a "magic include
file" and really is a collection of static functions. The
only way to explain it is with an example:
Hook::hook( 'myhook', 'arg1', 'arg2' ); will search in
the
include_path for a file called <pagename>-myhook.php, if
it's not founded looks for default-myhook.php, if isn't
founded looks for default-hooks/<pagename>-myhook.php and
finally for default-hooks/default-myhook.php. If any of
this files are founded it include it (and stop looking), in
the included file I have available an array called $args
with the name of the hook in $args[0] ('myhook' in the
example) and the hook arguments ('arg1' and 'arg2' in the
example), very similar to $argv. If no files are founded if
shows nothing (no error messages). There are other types of
hooks (for objects, hooks that include all the files it
found, etc). Well, as you see this is a very general and
powerfull class with many uses, so I don't know where to
put it. We use this functions to make at least 3 websites
(mostly LUGs websites: www.lugmen.org.ar, www.lugfi.org.ar
and www.mendoza-wireless.net.ar), so there are a lot of
other functions and classes using this lib (funtions to
make photo albums, event calendar, users profile and stuff
usefull for LUGs), so this is like an independent lib but
I'd like to make it PEAR friendly, so I don't know if may
it must be in a new category "Hook" or something.
There's not much documentation at the moment (at least not
in english) but here you can find the proyect sourcecode:
http://svn.llucax.hn.org:81/svn/hooks/tronco/
You can see to one implementation in the LUGFi's website
sourcecode too:
http://svn.llucax.hn.org:81/svn/lugfi/tronco/
I hope I didn't bored you too much, but I'd really like to know what do
you think about all this classes, since I have a lot of work to do
migrating them to PEAR and I want to do it right :)
But this is not all (maybe I had to write this in separated messages? :)
I have a big doubt: Is there any relation between categories and
directories where classes are? Or between Directories and class
inheritance? I mean, if a file is in Dir1/Dir2/File.php means that the
class File derivates from class Dir2 wich derivates from Dir1? I'm sorry
but I don't the relation between this 3 things (maybe beacause is no
relation? :).
And finally, I'm behind a firewall (and not very friendly) in my work,
so I can't download packages using pear commandline tool. Is there any
way to use a proxy server to download? Or... Is there a way to make a
PEAR packages mirror using a proxy? I mean, there's a "plain" site to
download the packages like an ftp or something?
Well thanks for your time, waiting for nice comments and suggestions...
- --
LUCA - Leandro Lucarella - Usando Debian GNU/Linux Sid - GNU Generation
- ------------------------------------------------------------------------
E-Mail / JID: luca@lugmen.org.ar
GPG Fingerprint: D9E1 4545 0F4B 7928 E82C 375D 4B02 0FE0 B08B 4FB2
GPG Key: gpg --keyserver pks.lugli.org.ar --recv-keys B08B4FB2
- ------------------------------------------------------------------------
Alisate el pelo que viene el peine.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+Ltx1SwIP4LCLT7IRAus5AJoDjAj6k+Prr+cBgvVKqwddOjcUswCfekX1
QQgkB+ka7FmwtVPVvPPbH2I=
=PMZB
-----END PGP SIGNATURE-----