• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to get my own class as library

#1
[eluser]saidbakr[/eluser]
Hello all,

I have a class published on www.phpclasses.org and its called Fox_captcha. It is meant by creating captcha verification images.

Its package includes two files, Fox_captcha.php - the class file - and another file called fox_captcha_image.php which generates image for reload the image.

My question how could I able to set it as a library working with CI?

Do you think using it as a helper will be better and how?

I think dealing it as an helper will require a third file inwhich I have to write a function that will able to initiate the object and its methods.

#2
[eluser]2think[/eluser]
Hi Said,

From my understanding of the user guide, helpers are more limited than libraries. Since you're talking about providing captcha image generation which may/may allow for more/different fonts, languages, etc. in the future, I would think a library would be the best fit.

As for incorporating it as a lib, check the user guide where there is a section with that very subject: http://ellislab.com/codeigniter/user-gui...aries.html

Best wishes.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.