zend-framework

Why is Zend Framework so popular?

别说谁变了你拦得住时间么 提交于 2019-12-29 04:30:06
问题 I'm not a troll and my goal isn't to start a flame war; neither do I mean to disrespect the authors of the Zend Framework: there is a lot of fine work in it. But... I have a job to get done and I'm having a hard time reconciling the popularity of ZF against the reality of building apps with it. I would really like to know from others why they use Zend Framework. I am fairly new to the PHP world but I've done a lot of programming in many languages. After reading many tutorials and building a

How to set up Hierarchical Zend Rest Routes?

↘锁芯ラ 提交于 2019-12-29 03:33:36
问题 With the Zend Framework, I am trying to build routes for a REST api on resources organized in the following pattern: http://example.org/users/ http://example.org/users/234 http://example.org/users/234/items http://example.org/users/234/items/34 How do I set up this with Zend_Rest_Route? Here is how I have setup the route for the users resource (users/:id) in my bootstrap.php file: $this->bootstrap('frontController'); $frontController = Zend_Controller_Front::getInstance(); $restRoute = new

Zend Framework 1.11 with Doctrine 2 Integration

自古美人都是妖i 提交于 2019-12-29 03:10:12
问题 Could someone explain in detail how to integrate Doctrine 2 and Zend Framework 1.11? 回答1: There is a great video by Jon Lebensold about integrating D2 and ZF: Unit Testing Doctrine 2 - don't be misleaded by the title :) 回答2: I know this is a late inclusion but I just did this following the Zend webinar recording at http://www.zend.com/en/webinar/Framework/70170000000bSrG-webinar-zf-v-1-doctrine-v-2-20101214.flv (you need a (free) Zend account to view it). Ralph Schindler also has the slides

How to use Join in Zend Framework

徘徊边缘 提交于 2019-12-29 01:44:12
问题 i am using Join query in zend.. like $select = $table->select() ->from(array('e' => 'EducationHistory'), array('status_DataDictionary_id')) ->join(array('r' => 'ReportOrder'), 'e.id = r.EducationHistory_id', array('reportOrderStatusId' => 'r.status_DataDictionary_id')) ->where('r.orderBy_Organization_id = ?', 4) ->where('r.orderBy_Person_id = ?', 1) ->group('e.enrollno'); and to do that i take help from http://framework.zend.com/manual/en/zend.db.select.html but when i try to run that query

Magento module Fatal error: Class 'Mage_Cashondelivery_Helper_Data' not found in \xampp\htdocs\magento\app\Mage.php on line 516

纵饮孤独 提交于 2019-12-28 16:02:14
问题 I am developing a payment Module for Magento. I did this using this tutorial http://www.magentocommerce.com/wiki/5_-_modules_and_development/payment/create-payment-method-module I have created folder app/local/Companyname/Cashondelivery/Block app/local/Companyname/Cashondelivery/Model app/local/Companyname/Cashondelivery/controller app/local/Companyname/Cashondelivery/etc app/local/Companyname/Cashondelivery/helpers The etc/config.xml <?xml version="1.0"?> <config> <modules> <Companyname

Zend File Upload and Element Decorators

末鹿安然 提交于 2019-12-28 04:31:07
问题 I have the problem, that the following Zend Form throws an error. The problem is the "file"-element and using setElementDecorators. class Products_AddForm extends Zend_Form { function init() { // other form elements... $uploadElement = new Zend_Form_Element_File('Excel'); $uploadElement->setLabel('Excel'); $this->addElement($uploadElement); $this->setElementDecorators(array( 'ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'th')),

Getting Zend_Navigation menu to work with jQuery's Fisheye

不羁的心 提交于 2019-12-28 03:32:15
问题 I'm using Zend_Navigation (sweet addition to the framework, btw) to build my menu, after which it should be rendered in the page (self-evidently). I first set the container somewhere in the controller: // $pages is the array containing all page information $nav = new Zend_Navigation($pages); $this->view->navigation($nav); Then, in the layout, it is rendered like this: echo $this->navigation()->menu(); which works perfectly. Now: I want the menu to be rendered a little differently. The page I

Extract div tags with specific class using PHP

别来无恙 提交于 2019-12-26 21:41:43
问题 Does any one know how to extract only div tags with particular class,in PHP? <div class="abc"> </div> <div class="def"> </div> <div class="xyz"> </div> I need div only with class="abc". How can I implement that? 回答1: What you want is: XPath <?php $html = new DOMDocument(); @$html->loadHtmlFile('thepage.html'); $xpath = new DOMXPath( $html ); $nodelist = $xpath->query( "//*[contains(@class, 'abc')]" ); foreach ($nodelist as $n){ echo $n->nodeValue."\n"; } ?> [updated] Added new xpath query.

Exception No form element was specified for “title” and one not be determined automatically from “Spiffy\Zend\Form”

戏子无情 提交于 2019-12-26 01:53:48
问题 In addtion to my previous question Attache zend filters and validation chains to models/doctrine entities I have given a try to Spiffy framework, but I got stack with this exception like this: Exception No form element was specified for "title" and one not be determined automatically from "Spiffy\Zend\Form". In my entity I have this: <?php namespace Entities; use Doctrine\ORM\Mapping as ORM; use Spiffy\Doctrine\AbstractEntity as Entity; use Spiffy\Doctrine\Annotations\Filters as Filter; use

I got Some Zend Message Error when Working Zend Database

不羁岁月 提交于 2019-12-25 18:24:54
问题 I get the following error message: Fatal error: Uncaught exception 'Zend_Exception' with message 'File "Zend\Db\Adapter\Mysql.php" does not exist or class "Zend_Db_Adapter_Mysql" was not found in the file' in C:\wamp\www\VPZ\Lib\Zend\Loader.php:88 Stack trace: #0 C:\wamp\www\VPZ\Lib\Zend\Db.php(247): Zend_Loader::loadClass('Zend_Db_Adapter...') #1 C:\wamp\www\VPZ\VPZ_Grid\core\vpz_datagrid.class.php(16): Zend_Db::factory('mysql') #2 C:\wamp\www\vpz_test.php(9): VPZ_DataGrid->ConnectDb(Object