You don't need to extend from anything. Just to be sure if file name is
emailChecker.class.php, then your class should be named as
class emailChecker { }Symfony will load it for you if it under /lib folder. Just call it like that anywhere in your project: $checker = new emailChecker(); Regards, S. 2009/9/2 jarthel <[email protected]> > > if I create it as a class, do I need to extend anything? > > thanks again > > On Sep 1, 3:33 pm, Stefan Koopmanschap <stefan.koopmansc...@symfony- > project.com> wrote: > > Hi, > > > > The best way to do this in my opinion is to create a class in the lib/ > > folder (or in a subfolder, for instance lib/jarthel) where you put the > > method. So for instance you might get an EmailChecker class with your > > checkMailFormat() method. Though what you are doing sounds like > > validation, so you could also put it in the form of a validator of > > course (having said that, you might want to look at symfony's e-mail > > validator:http://www.symfony-project.org/api/1_2/sfValidatorEmail) > > > > Stefan > > > > On Sep 1, 8:13 am, jarthel <[email protected]> wrote: > > > > > I have an "email address" format checker that I found in the net. It's > > > straight PHP with a function inside. > > > > > I'm a bit unsure on where to put it. I thought of putting it somewhere > > > in "project-here"/lib/vendor. Is it as simple as using require_once to > > > include the files? > > > > > Thank you > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
