Bootstrap modules using Zend Framework 1.8 - zend-framework

I'm trying to figure out how to implement a modular structure with autoloader and Zend_Application.
I've got an structure that goes ok, but with the last commit to the tag 1.8 stop working.
Can anybody try this code and see what's happened?
Thanks in advance

Have you read autloading-modular-forms-models-in-zend-framework-18? I'd suggest just posting the content of your Bootstrap.php file here.

Related

How to drawTextBlock in zend PDF

I using ZendFW 1.7.2 in my project and need to save PDF file. i am success for use function drawText but some of my data is too long so i need it break line. Now i get a solution from
http://devzone.zend.com/1776/creating-pdf-documents-with-zend-framework/
that use function drawTextBlock but when i test with it.It's can't success any always return errors
Fatal error: Call to undefined method Zend_Pdf_Page::drawTextBlock()
I think it's relate problem with something configuration ?Anyone used to success on it? please share it to me, I am looking to see your reply soon.
Thanks
DrawTextBlock is not existing in Zend Framework as it is a proposal for a improvement by Nico Edtinger. See: http://framework.zend.com/wiki/display/ZFPROP/Zend_Pdf+text+drawing+improvements+-+Nico+Edtinger
The solution provided on Zend Framework PDF multiline problems probably will help you further.

Zend/Controller/Action.php file missing

I'm new to Zend framework, and was trying out the Guestbook tutorial that Zend has on it's web site. I have the latest framework downloaded and setup properly; php.ini include_files has the library location set correctly. In the Guestbook tutorial, the GuestbookController extends Zend_Controller_Action and that's what I typed, but I keep getting error stating that Zend_Controller_Action is not found. Turns out, the folder Controller is missing from /library/Zend. I tried re-downloading Zend Framework thinking I might have accidentally deleted it, but it's not in the newly downloaded framework directory either. So, where can I get the Controller folder that contains all the required class files? Or how can I fix the issue? Any help is much appreciated.
Thanks
Kuni
It sounds like the tutorial you are following is for ZF1. ZF2 was released last year and works quite differently. You might want to try the quickstart from the current manual instead:
http://framework.zend.com/manual/2.0/en/user-guide/overview.html
Alternatively you can still download version 1.12 from the Zend site.

eclipse shiro ini problem

Honestly, before posting question did googling and 2 days tried to solve problem on my own...
I want to get Apache Shiro working with GAE. Before that, I had success with Spring Security, but here I can't do a simple thing: to get the filter find my shiro.ini !
After introducing ShiroFilter in web.xml, in init-param tag I give a value of classpath:shiro.ini for the param-name called configPath, as standard way.
Next, I put shiro.ini in my src root, won't work, then under /web-inf/shiro.ini, again didn't work...
any help please?
Maybe this tutorial of integrtating Shiro with GAE will be useful?

Zend-Framework 1.x with Doctrine 2.x

I know that there are many examples but this is my problem, because now I don't know which is the best and I don't understand every samples. This before I used doctrine 1.x and that was more simple for me, because there was only few steps to connect to database with doctrine and use it:
1.) Created User.yml file into application/doctrine/schema folder
2.) Run generate-models-yaml in cli which generated php classes into application/models/generated folder
3.) Again in cli run: create-db, create-tables
4.) In IndexController / IndexAction I can use it:
$newUser = new User();
$newUser->name = 'Demo';
$newUser->save;
And that's all. But with 2.0 I have some question:
- Where is the best place for mapping yaml files?
- How can I generate Entities from yaml? (Depending from the first answer)
- How can I create/drop db and tables?
- Which solution is the best EntitiyManager?
So I just want the most simple sample like my doctrine 1.x sample. Thanks!
For me best integration Bisna from Guilherme Blanco https://github.com/guilhermeblanco/ZendFramework1-Doctrine2
Step by step video tutorial using Bisna integration
http://www.zendcasts.com/unit-testing-doctrine-2-entities/2011/02/
Another very good example of ZF1 and Doctrine 2 with fully tested code (PHPUnit & Ant):
https://github.com/eddiejaoude/Zend-Framework--Doctrine-ORM--PHPUnit--Ant--Jenkins-CI--TDD-
They try to work best practice. Always.
Here is my two cents, I've wrote a Zend Framework 1.x resource for Doctrine 2.0
The source code is available on github.
This is another sample about zf1 and D2
https://github.com/marsbomber/zf1-doctrine2/tree/modular_setup
I used it and I think it was useful.

Wordpress And Zend

I am wanting to do stuff with the Google Data API, the contacts specifically. The easist method i have found so far is using Zend. The problem I am having is adding the Zend framework. Does anyone know how to do this with WordPress?
Thanks
you can use "hardcoded" includes if you fail to setup autoloading ->
in /wp-content/themes/levitation/send.php insert to the first line:
require_once 'your/path/to/zend/Zend/GData/ClientLogin.php';
Problem is you need to get through all the errors and alwas include the missing class (inside classes are the includes taken care of...
Or in the main file (guess index.php) insert:
set_include_path(get_include_path() . PATH_SEPARATOR . 'your/path/to/zend/');
//for ZF below 1.8
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();
//for ZF > 1.8
require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::setFallbackAutoloader(true);
It should be pretty trivial.
Write and test some bootstrap code that sets up ZF's autoloading and make sure it generally works.
Stick that code in a wordpress plugin, and tie things up to the right hooks in wordpress.
Try this http://blueberryware.net/2008/09/04/wp-library-autoloader-plugin
I think all you need is there.
Make sure that you are calling:
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
before you are using that class. And that you have a developer key.