zend-framework

zf create project path name-of-profile file-of-profile

浪子不回头ぞ 提交于 2019-12-23 10:40:52
问题 I was not able to find a good resource which is describing the following Zend_Tool command: zf create project path name-of-profile file-of-profile Not even here: http://framework.zend.com/manual/en/zend.tool.usage.cli.html Does somebody know a good resource regarding this command? Note: I'm interested in the name-of-profile and file-of-profile part. Usage, examples, etc. Maybe even a visual approach like in this references: http://marklodato.github.com/visual-git-guide/index-en.html http:/

MySql SSL connection with Zend-Framework

跟風遠走 提交于 2019-12-23 09:30:53
问题 I'm pretty new to Zend-Framework, but I managed to build a simple site in my PC with 2 pages that show the content of a table in a local database. The problem is that when I installed the site on the server, it didn't work because in the production server the connection to the local mysql server must be established using SSL. I searched for the keys that I need to add to the application.ini to enable the ssl connection but I couldn't find any in the ZendFramework documentation. Here is the

Doctrine 2 - persist error - Warning: spl_object_hash() expects parameter 1 to be object, null given

流过昼夜 提交于 2019-12-23 09:28:29
问题 I create such entries in DOctrine. I'm trying to add basket to page . This is my entities: My Entities: <?php namespace App\Entity; use Doctrine\Common\Collections\ArrayCollection; /** * @Entity(repositoryClass="App\Repository\Page") * @Table(name="page") */ class Page { /** * @Id @Column(type="integer", name="p_id") * @GeneratedValue */ private $p_id; /** @Column(type="string", name="p_title") */ private $p_title; /** @Column(type="datetime", name="p_created") */ private $p_created_at; /**

set cookie in zend framework

浪子不回头ぞ 提交于 2019-12-23 08:57:33
问题 I am new to zend framework. I have write this code to set cookie in my website. public function setCookie($data){ $email_cookie = new Zend_Http_Cookie('user_email_id', $data['user_email_id'], $_SERVER['HTTP_HOST'], '', FALSE); $pass_cookie = new Zend_Http_Cookie('user_password', $data['user_password'], $_SERVER['HTTP_HOST'], '', FALSE); $cookie_jar = new Zend_Http_CookieJar(); $cookie_jar->addCookie($email_cookie); $cookie_jar->addCookie($pass_cookie); } I dont even know by writing this code,

Zend Framework date without hours minutes and seconds

不羁岁月 提交于 2019-12-23 05:42:16
问题 Anybody can help me to get date formated with Zend framework What I do is: <?php echo new Zend_Date(2010-05-23, false, 'en');?> Result I get is : May 22, 2010 12:00:00 AM I what I need is: May 22, 2010 Thanks. 回答1: You can use the string formatting options and constants: // Using the strings for reading the format: $date = new Zend_Date('2010-05-23', 'yyyy-MM-dd'); // Using the constants for format: echo $date->toString(Zend_Date::MONTH_NAME." ".Zend_Date::DAY_SHORT.", ".Zend_Date::YEAR); 回答2

Zend_Test: Assert Controller Failed

徘徊边缘 提交于 2019-12-23 05:39:07
问题 I use Zend_Test for unit testing in Zend Framework. I have configured the bootstrap and testing environment properly then I got this error output from test unit Failed asserting last controller used <"error"> was "index" This error happens when I call my DbTable class inside action method such as public function indexAction() { $roleDb = new Model_DbTable_Role; $role = $roleDb->getAll(); $this->_forward('login'); } If I remove two lines role, unit testing is success. It is my unit testing

Gmail 3-legged OAuth access — Zend_Mail_Protocol_Exception

最后都变了- 提交于 2019-12-23 05:13:32
问题 I'm trying to access Gmail by using three-legged Oauth PHP code provided by Google ('google-mail-xoauth-tools') here: http://code.google.com/apis/gmail/oauth/code.html. I have my domain registered and everything seems to go fine with OAuth, but after I authorize access I get this error: Fatal error: Uncaught exception 'Zend_Mail_Protocol_Exception' with message 'cannot connect to host; error = Connection refused (errno = 111 )' in /home/tchaymor/public_html/gmail/Zend/Mail/Protocol/Imap.php

How to include the Zend framework?

纵饮孤独 提交于 2019-12-23 05:11:53
问题 I'm on windows 7 with wamp and I don't know where to put the zend framework, as I know I need to change the path of the include_path but I don't know what should that be to work. I get this error when I open the test files or anything withing the zend files: Warning: require_once(PHPUnit/Framework.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\zend\tests\TestHelper.php on line 26 Fatal error: require_once() [function.require]: Failed opening

zend_navigation and onclick attribute

风流意气都作罢 提交于 2019-12-23 04:50:48
问题 is there any way how to push into zend_navigation page type mvc or uri and give it onclick attribute? array ( 'type' => 'uri', 'label' => 'Map', 'title' => 'Map', 'uri' => '#', 'click' => 'alert("show map");' ) i have sub sub menus included links which fires only modal. till yet i use my own "navigation" solution but i want to use zend´s one. thank 回答1: i should mention that i know simple workaround - have some onload javascript function which attach events to some menu according their id´s

SSL CORS not working with Zend Guard

僤鯓⒐⒋嵵緔 提交于 2019-12-23 04:44:06
问题 I've added everything to my Apache htaccess: Header set Access-Control-Allow-Headers: X-Requested-With Header set Access-Control-Allow-Methods: OPTIONS Header add Access-Control-Allow-Methods: GET Header add Access-Control-Allow-Methods: POST Header add Access-Control-Allow-Headers: Content-Type Header add Access-Control-Allow-Headers: Depth Header add Access-Control-Allow-Headers: User-Agent Header add Access-Control-Allow-Headers: X-File-Size Header add Access-Control-Allow-Headers: X