How to configure MySQL data with php Zend framework? - php

I am working with core php for at least one year. Now I want to use a framework and I decided to use Zend Framework. But I could not able to configure/use MySQL database with Zend Framework.
Can any one tell me how to do this or give a link or tutorial from where I can do it my own.
Thanks
Enamul

I just provided answer to similar question that might help get you started. The Zend_Db component can be confusing in the beginning because there are so many options for using it. In fact there at least 3 different ways just to connect to a database.
How to use Zend Adapter to retrieve information from database

Related

Detect or identify a framework in php (Yii or CodeIgniter)

I have a quick question.
I have an existing project in php. Now, i am trying to set up locally. I am checking the way to find out which framework they have used.
Can any one guide me how to detect framework in that existing project? Is there any way?
Help would be appreciated.
You can use chrome extension "wappalyzer".This extension shows which frameworks are used.

Zend mail code in my php code?

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.

use zend framework in to develop Rest api in php

I want to build Rest apis in php and want to use MongoDB.
I found out that zend is widely used and also have good documentation.
But i couldn't find out that Zend framework has a support for MongoDB or not?
Any help would be appreciated. Thanks in advance.
I have not used ZEND so far, just know it is written in php. So to access mongodb you maybe could use the links which you find on following site: http://docs.mongodb.org/ecosystem/drivers/php-libraries/

php frameworks , when and why do i need them? [duplicate]

This question already has answers here:
To Use a PHP Framework or Not? [closed]
(12 answers)
Closed 9 years ago.
I need to create the server part of my mobile application.
The server part consists of registering a user to the server by making a simple http post request (json) from device to server and saving the users credentials to database (mysql).
Some http post requests from the devices , stating to the server in which kind of events they want to be subscribed (my server keeps data of some events).
Send push notifications , to my devices from the server when a new event is generated (already have the php scripts for that).
For a kind of server likes this , do i need to use a php framework? In this page i found a list of different frameworks. I found this page while reading php tutorials and some of them suggested using a php framework.
But what are these frameworks for? Do i need to learn/use one? When are they needed. Are they for front-end sites?
Thank you for reading my post :)
Frameworks are created to make your work easy.
Advantages of using framework
There are a lot of functions that are already written
There are some good programic patterns. You have good code and file organisation.
There are a lot of libraries and plugins.
There is MVC pattern already implemented.
They give you advantage of faster develompent.
There is community support
They are mostly fast and secure.
Why use a framework with PHP?
Why do I need to use a popular framework?
Using framework in the begining may seem to be hard, but when you learn it, it makes coding a lot faster!
Disadvantages of using framework:
You will learn a lot by writing your own.
If you need it for small project like portfolio, there is no need for giving yourself more work to set the framework to work.
There is a lot of things in framework that you don't need and they take its space on server.
https://softwareengineering.stackexchange.com/questions/49488/when-not-to-use-a-framework
It's not about frontend project, if you have big project you should use framework if it's little it's not worth. That is my opinion.
I'd suggest you Zend Framework or Symfony if you decide to use Framework.
I recently have the similar project requirement for a REST based application on PHP. We choose Zend Framework 2 which have REST supported architecture. I check out same support on Symfony 2. So One thing i get it that Framework gave you standrized way of code/architecture + set of tools. If I decided for core php application, then obviously I need to write a REST based API Server architecture. Which is already available in case of Frameworks.

May I use zend framework together with php files not using it

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.

Categories