zend-framework

Splitting up a Zend_Form

一笑奈何 提交于 2020-01-07 02:03:30
问题 I have created a Zend_From with a couple of fields. What I'd like to do, is put them inside paragraphs, so that they would flow naturally. For an example Danny had [select with 1-10] apples and James had [select with 3-20] pears. I have been trying to do this with $elem= $this->registerForm->getElement('danny'); but then on the output, the value of this element is not included in the form anymore. I also thought that this could be done with Zend_Form_SubForm() , but couldn't find any examples

ACL Ressource (Controller)

风流意气都作罢 提交于 2020-01-06 20:14:36
问题 i just implemented ACL in my Zend Framework which already uses Zend Auth. I want to give access to some controllers and tried it this way: $roleGuest = new Zend_Acl_Role('guest'); $this->addRole($roleGuest); $this->addRole(new Zend_Acl_Role('supplier')); $this->addRole(new Zend_Acl_Role('admin')); $this->add(new Zend_Acl_Resource('Articles')); $this->add(new Zend_Acl_Resource('Index')); $this->deny(); $this->allow('supplier', 'Articles'); $this->allow('admin', null); But a user, who is

Soap Client Call to SSL

↘锁芯ラ 提交于 2020-01-06 19:16:51
问题 I am trying to get the content of WSDL from HTTPS Server <?php echo file_get_contents("https://zendsoap.lan/Zend_Soap_Server.php?wsdl"); ?> It Return: Warning: file_get_contents() [function.file-get-contents]: SSL operation failed with code 1. OpenSSL Error messages: error:1408E0F4:SSL routines:func(142):reason(244) in /Applications/AMPPS/www/zendSoap.lan/Zend_Soap_Client.php on line 4 Warning: file_get_contents() [function.file-get-contents]: Failed to enable crypto in /Applications/AMPPS

Doctrine Join DQL

喜你入骨 提交于 2020-01-06 15:53:47
问题 I's like to do a join between 2 tables on a specific ID. At the moment, I have this DQL: $q = Doctrine_Query::create() ->select('e.*, i.itemName, i.itemtypeId') ->from('Model_EventItem e') ->leftJoin('Model_Item i ON e.itemId = i.itemId') ->where('e.eventitemId = ?', $event->eventId) ->orderBy('i.itemName ASC'); The result is empty, although my eventId has a value ... Can you help me please? I there somewhere a tutorial on DQL-joins? I don't get it right with the help of the Doctrine

Zend Form and nested fieldsets/containers?

别等时光非礼了梦想. 提交于 2020-01-06 14:46:13
问题 I have a form. I have a single element that needs to be wrapped in a div or fieldset (for formatting). Then I have two groups of elements, including the above, that I want to wrap in a fieldset or div. I've managed to create two groups, but Zend Form seems to balk at letting me create a group containing a group. Should I be able to do this? Here's a simple code example, assuming I have created elem1, elem2 and elem3. $form->addDisplayGroup(array('elem1'), 'group1', array("legend" => "Wrapped

Send email using gmail smtp in zend? [duplicate]

大憨熊 提交于 2020-01-06 14:16:06
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: email zend framwork smtp I have following configuration: smtp.type = Zend_Mail_Transport_Smtp smtp.smtpServer = "smtp.gmail.com" smtp.username = "ddd@gmail.com" smtp.password = "dddd" smtp.email = "ddd@gmail.com" smtp.port = "587" smtp.ssl = "tls" smtp.auth = "login" I am getting following error: 5.7.0 Must issue a STARTTLS command first. 74sm813723wem.41 My COde: public function sendEmail( $mailData, $bootstrap

Get stored Zend_Auth data from outside the zend project (in an extern non-zend-project)

跟風遠走 提交于 2020-01-06 13:52:59
问题 I'm working on a Zend project where I need to include another project, which isn't using ZF. This other project is stored in the public directory in the folder of the zend project. For this other project I need the logindata from the zend project (zend auth is used for this). There are 2 ways to accomplish this i think. Just get the stored login sessionvariable. But where/what variable? Or try to get the data with zend methodes in the other project. But how? Without changing the structure of

zend framework and doctrine 2 - save and download image from database to image field

ⅰ亾dé卋堺 提交于 2020-01-06 13:30:03
问题 I'm using zf and doctrine 2 in an application and I'm having a problem with trying to save images to a field in my database and download image from mysql blob field? Does anyone have a small example that I could work from? Thanks 回答1: I think this: https://gist.github.com/525030/38a0dd6a70e58f39e964ec53c746457dd37a5f58 Is exactly what you want. Because the blob datatype is not default supported you can add your own datatypes to Doctrine2. Using the example from the link you can set @Column

zend framework and doctrine 2 - save and download image from database to image field

我与影子孤独终老i 提交于 2020-01-06 13:29:36
问题 I'm using zf and doctrine 2 in an application and I'm having a problem with trying to save images to a field in my database and download image from mysql blob field? Does anyone have a small example that I could work from? Thanks 回答1: I think this: https://gist.github.com/525030/38a0dd6a70e58f39e964ec53c746457dd37a5f58 Is exactly what you want. Because the blob datatype is not default supported you can add your own datatypes to Doctrine2. Using the example from the link you can set @Column

zend header already send problem

吃可爱长大的小学妹 提交于 2020-01-06 12:45:48
问题 sometimes i got error when i include your class(AuthnetCim.class) in my controller. the error is as below:- Fatal error: Uncaught exception ‘Zend_Controller_Response_Exception’ with message ‘Cannot send headers; headers already sent in /home/newwebsi/public_html/B4BPHP/public/include/AuthnetCIM.class.php, line 1′ in /home/newwebsi/public_html/B4BPHP/library/Zend/Controller/Response/Abstract.php:321 Stack trace: #0 /home/newwebsi/public_html/B4BPHP/library/Zend/Controller/Response/Abstract.php