I've got some php code handling emails (not self written) which I want to integrate in my own self written system. In it, two Classes are used:
Zend_Mail_Storage_Pop3($params)
Zend_Mail_Storage_Imap($params)
I've heard of Zend before, but as far as I know it is some kind of full fledged php framework, not something I really what to incorporate in my system just to be able to use these two classes. So I downloaded Zend from the github page, but I can't even find those classes in there.
So my questions are:
Am I able (and if so, how?) to just use these two classes from Zend?
If not, is there an alternative to these two classes which are preferably very easy to use?
All tips are welcome!
It's hard to answer this question without knowing exactly what you want to do (you've just said what classes you think might achieve that goal), but hopefully I can point you in the right direction.
Zend Framework is a full PHP framework, but it was built as a collection of libraries, and to a certain extent you can just cherry pick individual components and only use those. The two classes you listed were from Zend Framework 1. What you downloaded from Github was Zend Framework 2, which is why you can't find them, but ZF2 does have equivalents.
Although you could download ZF1 and get your existing code to work, what I'd suggest you do instead is add just the ZF2 Mail component to your app using Composer. Then start here: http://framework.zend.com/manual/2.3/en/modules/zend.mail.read.html for the docs for the equivalent classes for what I'm guessing you're trying to do.
Related
I used PHP5 a long time ago and am presently trying to refresh my knowledge and augment it with knowledge of Zend Framework 2 and Smarty 3 for a possible project.
I'm currently trying to figure out how to use Smarty 3 as a replacement/supplement to Zend Framework 2.
Everything I can find through Google on this topic either:
Is outdated (e.g. Zend Framework 1)
Assumes I have a more intimate working knowledge about both Zend and Smarty than I actually do.
Can someone please explain to me as though I were 9, using the Zend Skeleton Application as my starting point:
In what directory/folder (using a fully qualified path), I should unzip the Smarty-3.1.12 package?
What class(es) I need to create, what exactly do they need to contain, and where should they be stored?
What files need to be modified, and how, to make Smarty available for viewing within my module(s)?
With reference to the above created classes, how can/should these be used from A-Z (e.g. including within appropriate classes, assigning values, creating outputs)?
There is quite good module SmartyModule
Definitely use composer to install it, it makes your life much easier :-)
And sample application
I am now working in a team to build a website using php. Told that Zend framework can be fairly convenient, I hope to use it to write the pages. However, some of the members in the team did not use the framework in their previous works. I do not know whether there will be any possible problems if their works are used together with mine? So I wonder whether it is possible for us to use Zend frameworks for part of the website while other members of the team do not use this framework to build the rest of the website? Thank you.
i not really sure to undersand your question
but it's look complicated to use ZF for a part of the site, and PHP for the other. However, it's possible. You can, with a .htaccess say that an URL is not define by ZF (i ever used it for a blog attached on a ZF site)
Don't hesitate to comment for any other answer
It depends on how you are splitting up the work. Zend Framework is modular so you are not tied into using the whole framework. You can just select the components you need. I would advise that you use one framework for your application startup and routing at least. Merging these part would be a hassle to maintain imo.
I'm planning to use a PHP framework (Yii) for my future project due to the amount of features that it would contain. I have done a few PHP projects in the past and I now realize how disorganized they can get after a while, even if you use a proper directory structure. So, basically, I'm wondering if everything in PHP, can also be done in a framework without tweaking the core framework itself. Will there be any limits? Can I use PHP classes like geolocation, phpexcel or phpthumb: http://phpthumb.gxdlabs.com? Preferably Yii. Thank you!
I'm wondering if everything in PHP, can also be done in a framework without tweaking the core framework itsel
No, every framework has its limits but some are more flexible than others. For example, some frameworks don't allow you to connect to multiple data-sources with their model implementation. But if it's a decent framework, you should be able to extend or swap out those shortcomings with your own or another implementation.
Can I use PHP classes like geolocation, phpexcel or phpthumb
Yes, most frameworks allow easy integration with other libraries. I found a link showing how to integrate phpexcel with Yii:
http://www.yiiframework.com/wiki/101/how-to-use-phpexcel-external-library-with-yii/
Yes All framworks have proscons, but it's very important that how we will user them, i.e cakephp provide the helper class to create html and form but no need to use each and every time that because it will make slow your application
CakePHP have also cache memory limitation, we found in one popular auction script.
I've read a couple of Related questions by the site, but can't find what I'm looking for.
After having done normal PHP without much extra(by which I mean a templating system) for a year now, I feel like trying Zend. Simply because it's the biggest name. I wanna try CakePHP too later.
I've been looking into the examples, but these are all inline-code examples.
In learning PHP, I've used a template system, in order to keep the PHP and the HTML completely separated. Is this possible with the Zend Framework, or should I use a template system alongside it?
Also, what's the deal with executing several .bat files? Is there really so much work in setting up folder-structures with the correct files in them should you did it manually?
Zend Framework is a quite good solution to use as separate modules or complete package as well. You can use only it's templater system (but it's not so super) or you can put on a whole system using Zend_Application, Zend_Controller, Zend_Db, Zend_View, etc.
The .bat (or .sh) file is for the Zend_Tool. It's an experimental command line tool to build modules and applications easier.
I guess you can use zend's built in template solution that comes with Zend View, roll your own, or even integrate something like Smarty. At the end of day, its your call. Zend is fairly flexible in terms of which of its component you want to use and which you don't.
frankly for me these components do the most of work and i dont think i will need more than
(Zend_view , Zend layout , Zend navigation ,Zend breadcrumb)
it's most likely to keep the PHP and the HTML completely separated
about zend tool : its just tool to make Zend development much easier
I highly recommend you take a look at the online tutorial found here. It's a step by step walk through the framework showing you the basics of how you'd build a small Zend Framework app, and shows you how to integrate things like access control, interface with the database, etc. It's written in really understandable language with great source code included.
As for the batch files, you may want to download a demo copy of Zend Studio. It allows you to create a ZF project and does all of the setup for you without requiring you to mess with the command line.
Good luck!
I highly recommend you must first understand the basic directory tree of Zend Framework including all setup needed and familiarization with bootstrapping and setting configurations with a .ini file.
Do you know others frameworks like PEAR (http://pear.php.net) ? I want to use reusable PHP components without using the famous PEAR.
I already use a framework (Zend Framework) and i want to use php components who doesn't exists in ZF like payment, encryption, math...
Check out EZ Components. It is a very loosly coupled set of libraries that I always see as sitting somewhere between something like PEAR and Zend Framework. Superbly coded and up to date, it is something to take a close look at.
I don't really do that much php, but I've worked along side php developers for some time and I've heard comparisons between PEAR, SMARTY and Zend Framework all the time. I can't really tell you how much alike they are, but these are the ones I've heard about the most. I've also heard some saying they work with Cake PHP or Symfony, but not as many.
I also found two nice comparisons that might help, here and here. That's about all the help I can be. Good luck. :)
As a Zend Framework fan myself I don't see why you don't extend Zend Framework based to your needs. I use a rather simple method by having a classes folder inside my application folder which you need to set up in bootstrap or load with Zend_Loader and there you can define your own logic or import different modules you're interested in ( phpClasses might be also very helpful).
You also can find a lot of helpers made by Zend Framework's community which might be helpful at any given time. If you like to go and strip off pieces of code from different sources you might also want to try to import some of the modules from other frameworks like Code Igniter or CakePhp into Zend Framework and that probably would be a fun and useful thing for you and if you'd like to share, maybe for all the community based around ZF
And I should warn you about Symfony (that evilpenguin wrote about), if you're willing to try it just don't forget it's the "laziest" of them all.