Search Results

Search found 1568 results on 63 pages for 'zend'.

Page 3/63 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • how to Decorate the error message on zend framework

    - by ulduz114
    this is the decorator code $mydecorate = array( 'ViewHelper', array('Errors', array('placement' => 'append','class' => 'error')), array('Label', array('separator' => '')), array('HtmlTag', array('tag' => 'p', 'class' => 'element-form')) ); html result of two input elements with the above decorator: <p class="element-form"> <label for="firstname" class="required">First Name:</label> <input name="firstname" id="firstname" value="" type="text"> </p><ul class="error"><li>required field!</li></ul> <p class="element-form"> <label for="lastname" class="required">Last Name:</label> <input name="lastname" id="lastname" value="" type="text"> </p><ul class="error"><li>required field!</li></ul> I'd like the error message to be placed inside the p.element-form tag, any idea pleas? thanks

    Read the article

  • Zend Framework Relationships - findDependentRowset

    - by Morten Nielsen
    Hello, When I call the method findDependentRowset, the returning rowset contains all the rows in the dependent table, and not only the rowsets that matches the reference. Hoping someone could explain this, since I was of the assumption that findDependentRowset would only return rowset matching my 'rule'? I have the following DbTable Models: class Model_DbTable_Advertisement extends Zend_Db_Table_Abstract { protected $_name = 'Advertisements'; protected $_primary = 'Id'; protected $_dependentTables = array ( 'Model_DbTable_Image', ); } class Model_DbTable_Image extends Zend_Db_Table_Abstract { protected $_name = 'Images'; protected $_primary = 'Id'; protected $_referenceMap = array( 'Images' => array( 'column' => 'AdvertisementId', 'refColumn' => 'Id', 'refTableClass' => 'Model_DbTable_Advertisement', ) ); } Now when i execute the following: (Simplified for Question sake) $model = new Model_DbTable_Advertisement(); $rowSet = $model->fetchAll(); $row = $rowSet->current(); $dRow = $row->findDependentRowset('Model_DbTable_Image'); I would expect $dRow to only contain 'Images' that has the same advertisementId as $row, but instead i receive all rows in the Images table. Any help appriciated. Kind regards, Morten

    Read the article

  • Passing variables to a Custom Zend Form Element

    - by user322003
    Hi, I'm trying to create a custom form element which extends Zend_Form_Element_Text with a validator (so I don't have to keep setting up the validator when I use certain elements). Anyway, I'm having trouble passing $maxChars variable to it when I instantiate it in my Main form. I've provided my shortened code below This is my custom element below class My_Form_Custom_Element extends Zend_Form_Element_Text { public $maxChars public function init() { $this->addValidator('StringLength', true, array(0, $this->maxChars)) } public function setProperties($maxChars) { $this->maxChars= $maxChars; } } This is where I instantiate my custom form element. class My_Form_Abc extends Zend_Form { public function __construct($options = null) { parent::__construct($options); $this->setName('abc'); $customElement = new My_Form_Custom_Element('myCustomElement'); $customElement->setProperties(100); //**<----This is where i set the $maxChars** $submit = new Zend_Form_Element_Submit('submit'); $submit -> setAttrib('id', 'submitbutton'); $this->addElements(array($customElement ,$submit)); } } When I try to pass '100' using $customElement-setProperties(100) in my Form, it doesnt get passed properly to my StringLength validator. I assume it's because the validator is getting called in Init? How can I fix this?

    Read the article

  • zend-framework navigation

    - by ulduz114
    i have this xml file for Creating a container , if i want create a db for save this items and and create container from db how should i do ? <?xml version="1.0" encoding="utf-8"?> <config> <nav> <logout> <label>logout</label> <controller>authentication</controller> <action>logout</action> <resource>logout</resource> </logout> <login> <label>login</label> <controller>authentication</controller> <action>login</action> <resource>login</resource> </login> <test> <label>test</label> <uri>#</uri> <resource>test</resource> <pages> <list> <label>list</label> <controller>tset</controller> <action>listtest</action> </list> <archive> <label>archive</label> <controller>myarchive</controller> <action>archive</action> </archive> </pages> </test> </nav> </config> and code in bootsrap $navContainerConfig = new Zend_Config_Xml(APPLICATION_PATH . 'navigation.xml', 'nav'); $navContainer = new Zend_Navigation($navContainerConfig);

    Read the article

  • Getting the last User ID in Zend Framework

    - by Ryan Murphy
    Using MySQL query browser, I manually made a table called users and input some date in the fields. I set the primary key to id and set it to auto increment. There are 3 rows, the highest id is 3. I then made the following class in the method directory to call upon the data in the table etc. class Application_Model_DbTable_User extends Zend_Db_Table_Abstract { protected $_name = 'user'; public function getLatestUserId() { $id = $this->getAdapter()->lastInsertId(); return $id; } } In the controller I do the following which gets the value generated by the method and lets the view access it: $usersDbModel = new Application_Model_DbTable_User(); $lastUserId = $usersDbModel->getLatestUserId(); $this->view->lastUserId = $lastUserId; In the view I then echo it to display it to the user: echo $this->lastUserId; However, even though my last id in the users table is 3. It displays 0. I have also tried: public function getLatestUserId() { $sql = 'SELECT max(id) FROM user'; $query = $this->query($sql); $result = $query->fetchAll(); return $result; } But this just throws out a server error. What have I done wrong? Am I missing something? Is there another way of doing this?

    Read the article

  • Zend Framework: Controller Plugins vs Action Helpers

    - by Laimoncijus
    Could someone give few tips and/or examples how Controller Plugins and Action Helpers are different? Are there situations where particular task could be accomplished with one but not another? For me they both look more or less the same and I'm often having trouble having to decide when to use what... Are there any big differences?

    Read the article

  • What the difference between zend framework and Wordpress as framework ?

    - by justjoe
    i only know wordpress and start to seek another alternative framework, zend. i heard hearsay that zend's better from others framework. if you're "a serous coder", or try to act like one, you need to use it on building your web app. some said zend is better. But it's subjective. It's fast ans secure. But nobody tell me the reason or at leas compare it with with wordpress. ultimate question : Do zend have theme or plugin just like wordpress ? any hint will be helpful

    Read the article

  • Integrating Zend Controller Standalone - without the rest of Zend Framework

    - by ssmusoke
    I am using specific parts of the Zend Framework in my application, and I would like to replace my home grown controller with a Zend Framework controller. My home grown controller is based on an index.php file to which all requests are submitted. A controller is instantiated based on parameters sent within the request After processing the user is forwarded to url which is based on the request information, either a url is specified or some data is analysed I would like ideas on how to integrate the Zend Controller within my application Thanks in advance

    Read the article

  • Zend framework Zend_Controller_Action_HelperBroker::addPath does not work

    - by Carl Adam McDade
    I get this message regardless of the path used and even if I place the class file in the default directory location. Zend_Controller_Action_HelperBroker::addPath('./Plugins/Helpers','Helper'); Sorry, An error has occured: Application Error:exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'FormLoader' was not found in the registry; used paths: Zend_Controller_Action_Helper_: Zend/Controller/Action/Helper/' in C:\PHP\Zendframework\Zend\Loader\PluginLoader.php:412 Stack trace: #0 C:\PHP\Zendframework\Zend\Controller\Action\HelperBroker.php(366): Zend_Loader_PluginLoader->load('FormLoader') #1 C:\PHP\Zendframework\Zend\Controller\Action\HelperBroker.php(293): Zend_Controller_Action_HelperBroker::_loadHelper('FormLoader') #2 C:\PHP\Zendframework\Zend\Controller\Action\HelperBroker.php(323): Zend_Controller_Action_HelperBroker->getHelper('formLoader') #3 D:\websites\maklare.easypic.se\appfiles\application\controllers\UserController.php(13): Zend_Controller_Action_HelperBroker->__call('formLoader', Array) #4 D:\websites\maklare.easypic.se\appfiles\application\controllers\UserController.php(13): Zend_Controller_Action_HelperBroker->formLoader('login') #5 C:\PHP\Zendframework\Zend\Controller\Action.php(513): UserController->indexAction() #6 C:\PHP\Zendframework\Zend\Controller\Dispatcher\Standard.php(295): Zend_Controller_Action->dispatch('indexAction') #7 C:\PHP\Zendframework\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #8 C:\PHP\Zendframework\Zend\Controller\Front.php(212): Zend_Controller_Front->dispatch() #9 D:\websites\maklare.easypic.se\index.php(23): Zend_Controller_Front::run('D:\websites\mak...') #10 {main} Next exception 'Zend_Controller_Action_Exception' with message 'Action Helper by name FormLoader not found' in C:\PHP\Zendframework\Zend\Controller\Action\HelperBroker.php:369 Stack trace: #0 C:\PHP\Zendframework\Zend\Controller\Action\HelperBroker.php(293): Zend_Controller_Action_HelperBroker::_loadHelper('FormLoader') #1 C:\PHP\Zendframework\Zend\Controller\Action\HelperBroker.php(323): Zend_Controller_Action_HelperBroker->getHelper('formLoader') #2 D:\websites\maklare.easypic.se\appfiles\application\controllers\UserController.php(13): Zend_Controller_Action_HelperBroker->__call('formLoader', Array) #3 D:\websites\maklare.easypic.se\appfiles\application\controllers\UserController.php(13): Zend_Controller_Action_HelperBroker->formLoader('login') #4 C:\PHP\Zendframework\Zend\Controller\Action.php(513): UserController->indexAction() #5 C:\PHP\Zendframework\Zend\Controller\Dispatcher\Standard.php(295): Zend_Controller_Action->dispatch('indexAction') #6 C:\PHP\Zendframework\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #7 C:\PHP\Zendframework\Zend\Controller\Front.php(212): Zend_Controller_Front->dispatch() #8 D:\websites\maklare.easypic.se\index.php(23): Zend_Controller_Front::run('D:\websites\mak...') #9 {main}

    Read the article

  • Is Zend Certification "needed" before starting with the Zend Framework?

    - by mojah
    Hi, We're starting a new project using the Zend Framework, because the ideas and expandability speaks to us. But now I'm wondering, should we first get some form of Zend Certification before starting with the Zend Framework? Will we miss fundamental yet basic groundrules if we just start "hacking away" using the Zend Framework? I don't want to see us have to redo (part of) the project, because we missed some vital guidelines from the beginning, forcing us to rewrite our code. If possible, I'd love to hear stories of others having used the Zend Framework, without certification, to see what limitations they ran accross.

    Read the article

  • Zend database query result converts column values to null

    - by David Zapata
    Hi again. I am using the next instructions to get some registers from my Database. Create the needed models (from the params module): $obj_paramtype_model = new Params_Model_DbTable_Paramtype(); $obj_param_model = new Params_Model_DbTable_Param(); Getting the available locales from the database // This returns a Zend_Db_Table_Row_Abstract class object $obj_paramtype = $obj_paramtype_model->getParamtypeByValue('available_locales'); // This is a query used to add conditions to the next sentence. This is executed from the Params_Model_DbTable_Param instance class, that depends from Params_Model_DbTable_Paramtype class (reference map and dependentTables arrays are fine in both classes) $obj_select = $this->select()->where('deleted_at IS NULL')->order('name'); // Execute the next query, applying the select restrictions. This returns a Zend_Db_Table_Rowset_Abstract class object. This means "Find Params by Paramtype" $obj_params_rowset = $obj_paramtype->findDependentRowset('Params_Model_DbTable_Param', 'Paramtype', $obj_paramtype); // Here the firebug log displays the queries.... Zend_Registry::get('log')->debug($obj_params_rowset); I have a profiler for all my DB executions from Zend. At this point the log and profiler objects (that includes Firebug writers), shows the executed SQL Queries, and the last line displays the resulting Zend_Db_Table_Rowset_Abstract class object. If I execute the SQL Queries in some MySQL Client, the results are as expected. But the Zend Firebug log writer displays as NULL the column values with latin characters (ñ). In other words, the external SQL client shows es_CO | Español de Colombia and en_US | English of United States but the Query results from Zend displays (and returns) es_CO | null and en_US | English of United States. I've deleted the ñ character from Español de Colombia and the query results are just fine in my Zend Log Firebug screen, and in the final Zend Form element. The MySQL database, tables and columns are in UTF-8 - utf8_unicode_ci collation. All my zend framework pages are in UTF-8 charset. I'm using XAMPP 1.7.1 (PHP 5.2.9, Apache at port 90 and MySQL 5.1.33-community) running on Windows 7 Ultimate; Zend Framework 1.10.1. I'm sorry if there is so much information, but I don't really know why could that happen, so I tryed to provide as much related information as I could to help to find some answer.

    Read the article

  • Commitment to Zend Framework - any arguments against?

    - by Pekka
    I am refurbishing a big CMS that I have been working on for quite a number of years now. The product itself is great, but some components, the Database and translation classes for example, need urgent replacing - partly self-made as far back as 2002, grown into a bit of a chaos over time, and might have trouble surviving a security audit. So, I've been looking closely at a number of frameworks (or, more exactly, component Libraries, as I do not intend to change the basic structure of the CMS) and ended up with liking Zend Framework the best. They offer a solid MVC model but don't force you into it, and they offer a lot of professional components that have obviously received a lot of attention (Did you know there are multiple plurals in Russian, and you can't translate them using a simple ($number == 0) or ($number > 1) switch? I didn't, but Zend_Translate can handle it. Just to illustrate the level of thorougness the library seems to have been built with.) I am now literally at the point of no return, starting to replace key components of the system by the Zend-made ones. I'm not really having second thoughts - and I am surely not looking to incite a flame war - but before going onward, I would like to step back for a moment and look whether there is anything speaking against tying a big system closely to Zend Framework. What I like about Zend: As far as I can see, very high quality code Extremely well documented, at least regarding introductions to how things work (Haven't had to use detailed API documentation yet) Backed by a company that has an interest in seeing the framework prosper Well received in the community, has a considerable user base Employs coding standards I like Comes with a full set of unit tests Feels to me like the right choice to make - or at least, one of the right choices - in terms of modern, professional PHP development. I have been thinking about encapsulating and abstracting ZF's functionality into own classes to be able to switch frameworks more easily, but have come to the conclusion that this would not be a good idea because: it would be an unnecessary level of abstraction it could cost performance the big advantage of using a framework - the existence of a developer base that is familiar with its components - would partly be cancelled out therefore, the commitment to ZF would be a deep one. Thus my question: Is there anything substantial speaking against committing to the Zend Framework? Do you have insider knowledge of plans of Zend Inc.'s to go evil in 2011, and make it a closed source library? Is Zend Inc. run by vampires? Are there conceptual flaws in the code base you start to notice when you've transitioned all your projects to it? Is the appearance of quality code an illusion? Does the code look good, but run terribly slow on anything below my quad-core workstation?

    Read the article

  • How do I use ViewScripts on Zend_Form File Elements?

    - by Sonny
    I am using this ViewScript for my standard form elements: <div class="field" id="field_<?php echo $this->element->getId(); ?>"> <?php if (0 < strlen($this->element->getLabel())) : ?> <?php echo $this->formLabel($this->element->getName(), $this->element->getLabel());?> <?php endif; ?> <span class="value"><?php echo $this->{$this->element->helper}( $this->element->getName(), $this->element->getValue(), $this->element->getAttribs() ) ?></span> <?php if (0 < $this->element->getMessages()->length) : ?> <?php echo $this->formErrors($this->element->getMessages()); ?> <?php endif; ?> <?php if (0 < strlen($this->element->getDescription())) : ?> <span class="hint"><?php echo $this->element->getDescription(); ?></span> <?php endif; ?> </div> Trying to use that ViewScript alone results in an error: Exception caught by form: No file decorator found... unable to render file element Looking at this FAQ revealed part of my problem, and I updated my form element decorators like this: 'decorators' => array( array('File'), array('ViewScript', array('viewScript' => 'form/field.phtml')) ) Now it's rendering the file element twice, once within my view script, and extra elements with the file element outside my view script: <input type="hidden" name="MAX_FILE_SIZE" value="8388608" id="MAX_FILE_SIZE" /> <input type="hidden" name="UPLOAD_IDENTIFIER" value="4b5f7335a55ee" id="progress_key" /> <input type="file" name="upload_file" id="upload_file" /> <div class="field" id="field_upload_file"> <label for="upload_file">Upload File</label> <span class="value"><input type="file" name="upload_file" id="upload_file" /></span> </div> Any ideas on how to handle this properly with a ViewScript?

    Read the article

  • Zend Framework 2 loading slow and loss of connection using WAMP

    - by Charlie
    I've been facing an issue with Zend framework running on my local Wamp 2.2 server. I am not sure what I'm doing wrong but ZF2 seems to load really slow when making an http request. Any other request to a php or html file seems to run smoothly. Also, sometimes when the loading time takes longer, I get this message: "The connection to [virtualhostname] was interrupted" I then need to hit refresh to complete the request. I checked apache error log and everything looks fine. Please, I appreciate any type of guide/suggestion to take care of this issue. I followed the starter guide word by word.

    Read the article

  • Learning Zend Framework 1 or 2?

    - by ehijon
    I have programmed for a few years in php and now I'm going to learn zend framwork. Zend is very popular and there are a lot of tutorials, books and documentation out there. But I saw in the last months that there is a second version of Zend, but it's not so used and popular, not yet. I think it is better to start with a new version, but I don't know what to do now, as when I see job offers many people require the first version. Which version do you suggest me?

    Read the article

  • How to avoid index.php in Zend Framework route using Nginx rewrite

    - by Adam Benayoun
    I am trying to get rid of index.php from the default Zend Framework route. I think it should be corrected at the server level and not on the application. (Correct me if I am wrong, but I think doing it on the server side is more efficient). I run Nginx 0.7.1 and php-fpm 5.3.3 This is my nginx configuration server { listen *:80; server_name domain; root /path/to/http; index index.php; client_max_body_size 30m; location / { try_files $uri $uri/ /index.php?$args; } location /min { try_files $uri $uri/ /min/index.php?q=; } location /blog { try_files $uri $uri/ /blog/index.php; } location /apc { try_files $uri $uri/ /apc.php$args; } location ~ \.php { include /usr/local/etc/nginx/conf.d/params/fastcgi_params_local; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_script_name; fastcgi_param SERVER_NAME $http_host; fastcgi_pass 127.0.0.1:9000; } location ~* ^.+\.(ht|svn)$ { deny all; } # Static files location location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ { expires max; } } Basically www.domain.com/index.php/path/to/url and www.domain.com/path/to/url serves the same content. I'd like to fix this using nginx rewrite. Any help will be appreciated.

    Read the article

  • Using zend studio with codeigniter

    - by Nicole Adler
    I want to use Zend Studio for a project built on CodeIgniter. But I want to be able to use the debugging functionality of Zend. Because of that, I cant seem to get the debugger to work properly cause it doesnt "understand" codeigniter. So, in order for the setup to work, do I need to install Zend server, so that the debugging is done serverside? Can someone explain this to me a bit? Thank you.

    Read the article

  • Selecting arbitrary strings with Zend DB Select?

    - by wizzard
    I am using the fluent interface to create a Zend DB Select object/query. As part of the query, I would like to select an arbitrary string, like "SELECT 'foo' AS 'type' FROM ...". foo is not a column, it's just a string literal. When I select an arbitrary number, the query works as expected. When I change it to a string, Zend tries to treat foo as a column, and throws an error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l.foo' in 'field list' I have tried wrapping the string in Zend_Db_Expr in various ways such as: $select->columns(array('type' => new Zend_Db_Expr('foo'))); That stops Zend from adding the correlation name, but it still treats it as a column: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'foo' in 'field list' I feel like I must be missing something obvious here. How do I tell Zend to stop treating this as a column?

    Read the article

  • How to avoid index.php in Zend Framework?

    - by henriquev
    I'm using the Zend Router and so things like (/ and /index.php) or (/about and /index.php/about) ends up as the same here. However, /index.php/whatever should not exist as it is the exactly same resource as /whatever so it doesn't make a sense the duplication. How do I avoid this? Even http://zendframework.com/manual/en/zend.controller.router.html and http://zendframework.com/index.php/manual/en/zend.controller.router.html both exists. It doesn't make any sense at all...

    Read the article

  • Difference between Zend Framework 1.8 and 1.11 [closed]

    - by user985482
    Hi I have about 6 months of PHP experience and now I am thinking of starting of learning Zend Framework. I learn best usually from books and I noticed on amazon that the most recent release is for the version 1.8. Zend Framework 1.8 Web Application Development Since the curent version is 1.11 will this be a problem in the future? What is the difference beetween the versions. Can anyone recommend a more recent book for this framework?

    Read the article

  • Zend Form not in place labbels values, how to move them that they will be exactly above text box?

    - by Yosef
    Hi, I have esthetic's problem. Zend Form not in place label value, how to move them that they will be exactly above text box, and not from left? (I didn't put filters and validation to make this code simpler here) Thanks, Yosef My Code Login.php form: public function init() { $username = new Zend_Form_Element_Text('username'); $username->setLabel("username"); $password = new Zend_Form_Element_Password('password'); $password->setLabel('password'); $this->addElements(array($username, $password)); }

    Read the article

  • How do I add complex where clause to Zend Table Select?

    - by AD
    I searched the Web and could not find anything that would show me a good solid example. My question is basically this: How do I convert this: SELECT * FROM table WHERE ((a = 1 AND b = 2) OR (c = 3 OR c = 4)) AND d = 5; To Zend syntax similar to this: $this -select() -from($this-_schema.'.'.$this-_name) -where('a = ?', '1'); So how can it be done? Thank a lot in advance.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >