zend-framework

Zend Multiselect Element is posting only one selected values

陌路散爱 提交于 2019-12-14 02:33:45
问题 I am creating multiple select element like this and it is showed successfully on form: $element = new Zend_Form_Element_Multiselect('clinics'); $element->setLabel("Clinics"); $element->setAttrib( 'style','width: 240px' ); $element->setMultiOptions( array( '1'=>'clinic1', '2'=>'clinic2' ) ); After rendering above element it shows the following html in html source: <select name="clinics[]" id="clinics" multiple="multiple" style="width: 240px" size="5" class="required" tabindex="41"> <option

view helper in zend framework

你说的曾经没有我的故事 提交于 2019-12-14 02:25:55
问题 I found this helper code from rob allens' Zend_Auth login/logout tutorial class Zend_View_Helper_LoggedInAs extends Zend_View_Helper_Abstract { public function loggedInAs() { $auth = Zend_Auth::getInstance(); if ($auth->hasIdentity()) { $username = $auth->getIdentity()->WSLoginName; $logoutUrl = $this->view->url(array('controller' => 'login', 'action' => 'logout', 'module' => 'member'), null, true); return 'Welcome '. $username . '. <a href="'. $logoutUrl . '">Logout</a>'; } $request = Zend

how can we make Zend session storage as persistent among available methods?

拜拜、爱过 提交于 2019-12-14 02:25:48
问题 I am little bit confused about Zend authentication session storage system. I will try to explain my problem. Please try to express your opinion or anything you know about zend session or my assumptions and questions. By default, Zend_Auth_Adapter_DbTable returns the identity supplied back to the auth object upon successful authentication. If I use getStorage() or getIdentity(), so I can able to retrieve "Session values(id, name,..)" to some variables. !! If you think above both assumption are

Errors when implementing WURFL with Zend

◇◆丶佛笑我妖孽 提交于 2019-12-14 02:19:21
问题 I've looked around and cant seem to find someone with the same issue as me, hoping i've not missed a clanger here. I'm wanting to get device browser information for each user, i'm currently planning on doing this within the bootstrapper, following something i saw in PHP conference. To that end i came across: http://framework.zend.com/manual/en/zend.http.user-agent.html Which explains how to install and use wurfl. I've followed the instructions and am coming up with the following exception:

Zend_Controller_Router_Route: Could not find a translator

一世执手 提交于 2019-12-14 02:06:02
问题 I am developing a multilanguage application. In the bootstrap there is the routes setup: protected function _initRoutes() { $this->bootstrap('frontController'); $router = $this->frontController->getRouter(); // PAGES ROUTE $page = new Zend_Controller_Router_Route( ':language/:ident', array( 'module' => 'core', 'controller' => 'pagine', 'action' => 'view' ), array( 'ident' => '[a-zA-Z-_0-9]{3,}', 'language' => '[a-z]{2}' ) ); $registrazione = new Zend_Controller_Router_Route( ':language/

Why does my PHP with Zend Framework go crazy about “session started” since update to 5.4 (after a session exists on filesystem)?

寵の児 提交于 2019-12-14 01:04:42
问题 I never had problems with any of my projects. Just recently when I ran a pacman-update in arch linux (which updated to 5.4) many of my projects where not runnable anymore. Interestingly the problem only occurs as soon as the session-file was created on the filesystem . I mean, I can call the website a first time, as long as the /tmp/sess* does not exist. When I want to call it a second time and /tmp/sess* has already been written, I get the following error (including stacktrace, Zend

Integration between Zend Framework and Facebook Connect

旧街凉风 提交于 2019-12-14 00:26:30
问题 I'm developing a web app with zend framework and i'd like to discuss what is the best way to intergrate all the JS and FBML in a ZF project, anyone have some experience. For example, which may be a good solution for have the Facebook istante in every controllers, a front controller plugin? 回答1: Since JS and FBML is part of the presentation layer, these would have to go into ViewHelpers. Fetching data from FB via their APIs would go into a service, like Zend_Service_Facebook. There is a

Domain Driven Design issue regarding repository

◇◆丶佛笑我妖孽 提交于 2019-12-14 00:26:01
问题 I am trying to implement the DDD so I have created the following classes - User [the domain model] - UserRepository [a central factory to manage the object(s)] - UserMapper + UserDbTable [A Mapper to map application functionality and provide the CRUD implementation] My first question is that when a model needs to communicate with the persistent layer should it contact the Repository or the mapper? Personally I am thinking that it should ask the repository which will contact the mapper and

Apache rewrite rule to NGINX for HHVM

删除回忆录丶 提交于 2019-12-13 22:03:41
问题 We're moving from apache to NGINX and Hip Hop Virtual Machine (HHVM). I can't seem to get our rewrite rules lined up and working properly in NGINX. Here is the current working apache rule set: RewriteEngine On RewriteBase / #send www.domain.com -> domain.com RewriteCond %{HTTP_HOST} ^www\.domain\.com$ RewriteRule ^(.*)$ http://domain.com%{REQUEST_URI} [R=301,L] RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ -

Zend captcha Image generates blank

时光毁灭记忆、已成空白 提交于 2019-12-13 21:58:13
问题 The image captcha randomly displays a blank captch. Roughly 4 out of 10 attempts. I have already discovered the problem and a post on the zend forum suggest the only fix is to edit the Zend Framework code. Is there any way to fix this without editing the ZF code? How come Zend have not fixed this in the releases since then, I have a look in the change log but nothing related to this? $w = $this->getWidth(); $h = $this->getHeight(); $fsize = $this->getFontSize(); $img_file = $this->getImgDir()