zend-framework

How to get related object Propel ORM

好久不见. 提交于 2019-12-11 18:20:12
问题 Working on a project with the Zend Framework, I am using Propel ORM with many related database objects. I am new to both, but I have the object models created and working. I am just trying to get my head around object access now. I have a method for creating a new user, its working good and updates related rows (Not every related, but it's a start). Now I want to present the 'New' user data to the system user (user creater). I get the username back and I now want to get the 'UserLevel' among

File uploaded in a folder depending on the file name and extension. Jquery/blueimp - plugin

自作多情 提交于 2019-12-11 18:17:24
问题 I would kindly ask all of you if you could help me. I'm working in zend framework and I need to adjust my code so, when a user drops the file in the browser(before the actual upload), the file name and extension is checked in a sense if it already exists. Depending on the existence of the ifle, an icon right by the trash icon will appear (green tick if fresh upload, no other file with the same name. Red cross if there is a file). But to address a matter that is more important to me, and that

multi description meta tags in html head

一世执手 提交于 2019-12-11 17:48:33
问题 in Zend FW when I add description meta tag in loop using helper: $this->headMeta()->appendName('DESCRIPTION', $des); i got multi meta tags in my html head. <meta name="DESCRIPTION" content="des1" /> <meta name="DESCRIPTION" content="des2" /> how can i prevent it and have something like below in my html head: <meta name="DESCRIPTION" content="des1 des2" /> 回答1: Extend you own head view helper callable like this. $this->headDescription($stringToAttach); and offer a method to push the values to

Zend HTTP Client Invalid URI?

China☆狼群 提交于 2019-12-11 17:47:15
问题 I'm having trouble using Zend HTTP on a URL: $client = new Zend_Http_Client('http://xxfire_killumiex.api.channel.livestream.com/2.0/info.json'); $feed = $client->request()->getBody(); For some reason, this gives me an error... Invalid URI supplied Whats wrong this this specific url? 回答1: Whats wrong this this specific url? The underscore. From RFC 1912 Allowable characters in a label for a host name are only ASCII letters, digits, and the `-' character. Edit After doing some more reading, it

Zend ServiceManager using setter injection

风格不统一 提交于 2019-12-11 17:17:23
问题 in symfony i can use the setter injection for services via call option (https://symfony.com/doc/current/service_container/calls.html) The example from the symfony documentation: class MessageGenerator { private $logger; public function setLogger(LoggerInterface $logger) { $this->logger = $logger; } // ... } service.yml services: App\Service\MessageGenerator: # ... calls: - method: setLogger arguments: - '@logger' I need this behaviour for my zend project. i want to inject a InputFilter into

How to add a third-party Action Helper to a Zend Framework 1.8+ application?

本小妞迷上赌 提交于 2019-12-11 16:59:05
问题 I have downloaded a third party action helper that I would like to add to my application. How can I do this? 回答1: Using the Noginn SendFile Action Helper as a reference, dropped into the library directory, the directory structure looks like this: /library /Noginn /Controller /Action /Helper /SendFile.php In /application/Bootstrap.php add an init function and add the class prefix: protected function _initActionHelpers() { Zend_Controller_Action_HelperBroker::addPrefix('Noginn_Controller_Action

cannot access Zend projects after uninstalling and re-installing wamp

别来无恙 提交于 2019-12-11 16:52:00
问题 I uninstalled WAMP in error, then downloaded and reinstalled a new one, same version. Having looked through the WAMP directories, I can see that my databases are still intact(I think) and I can access them through a MYSQL client. But I am unable to access my projects as before the accidental uninstal. My projects are Zend. I have set PHP include_path on the new PHP installation to point to ZendFramework library folder and to WAMP "www" folder. I have re-created new APACHE v-hosts to point to

addFilter Rename ZendFramework

耗尽温柔 提交于 2019-12-11 16:47:13
问题 i need to Rename a file with Zend_File_Transfer() only if new file match with old one in the server using some convention like newfile-1.ext where the -1 is the string that is added but Rename filter is strange, i really dont understand so good. For example, is necesary some like this: if(file_exists($file)){ $upload->addFilter('Rename', $file); } or Rename does it? thanks 回答1: Here is an example from one of my apps. File is recvieved by an Zend_Form $upload->receive(); $name = $upload-

php-fpm one error log file per pool

大兔子大兔子 提交于 2019-12-11 16:45:06
问题 I would like to have one error log file for each of my pool. However, all errors are always logged to /var/php5-fpm/error.log which is my global error log file defined in php-fpm.conf . Here is the log configuration of my pool. php_flag[display_errors] = on php_admin_value[error_log] = /var/log/php5-fpm/$pool.error.log php_admin_flag[log_errors] = true I also tried to set catch_workers_output to yes without success. I also tried to directly add error_log to my pool configuration file but that

Show login form on every page using Zend Form

给你一囗甜甜゛ 提交于 2019-12-11 16:34:15
问题 I cant seem to figure out how to create a flexible sidebar containing and login form (Zend_Form) and various module/controller specific links. The most common solution seems to be using: echo $this->action('login', 'authentication', 'default'); But apperently this isnt the 'best' way? I've read that this apprently triggers a dispatchloop and thereby take a performance hit? I've thought about sing a View_Helper for the sidebar: class Zend_View_Helper_Sidebar extends Zend_View_Helper_Abstract {