zend-framework

Zend_Gdata_Photos listing all albums and photos

谁都会走 提交于 2020-01-06 04:54:09
问题 I'm using the Zend_Gdata_Photos PHP client to access the Google Picasa API, trying to just do something very simple, list all the albums, and then list all the photos within each album. This is my code: $client = Zend_Gdata_ClientLogin::getHttpClient('*****', '*****', Zend_Gdata_Photos::AUTH_SERVICE_NAME); $gp = new Zend_Gdata_Photos($client); $userFeed = $gp->getUserFeed('default'); foreach ($userFeed as $albumEntry) { echo "<h2>{$albumEntry->title->text} ({$albumEntry->id->text})</h2>";

Sending ByteArray to Zend_Amf

我只是一个虾纸丫 提交于 2020-01-06 04:33:30
问题 I'm having problems sending a ByteArray over to my Zend_Amf_server. I get a NetConnection.Bad.Call back from the server. If I send a variable with another datatype then ByteArray it works fine. I used the same script before with AMFPHP witouth any problems. But for this project I really need this to work in Zend_Amf. AS3: var path:String = "/images/picture.jpg"; var ba:ByteArray = jpgencoder.encode(bitmap.bitmapData); var nc:NetConnection = new NetConnection(); nc.connect(zend_amf_server); nc

Zend Framework - Redirect to routed direction

别等时光非礼了梦想. 提交于 2020-01-06 03:59:52
问题 I have a small problem with PHP Zend Framework. I have the following routes in file application.ini: resources.router.routes.mainpage.route = "main-page.html" resources.router.routes.mainpage.defaults.controller = "index" resources.router.routes.mainpage.defaults.acion = "index" If i do a direct in any action: $this->_helper->redirector('index', 'index'); then i will be redirect to adress: my-project/public/index/index But i want to adress be a my-project/public/main-page.html (as it is

JQuery :toggle images

妖精的绣舞 提交于 2020-01-06 03:39:05
问题 I would like to toggle photo by jQuery while I click on specific div , I have two image (close1.gif and open.png), Now it's working just first time , close photo replace to open photo, but I want to replace open photo to close if I click on div again. Here is my code: HTML: <div class=" server_Toggle subject-panel"> <div> <p >server property</p><img alt="" src="images/close1.gif"> </div> <ul id = "hidden_server"> <li> <a href="<?php echo $this->url( array( 'controller' => 'server', 'action' =

Zend route regex, optional parameters

跟風遠走 提交于 2020-01-06 03:27:11
问题 I need some help about my routes in Zend (Zend1) ... I need that I can use my route like that : http://mywebsite.com/myfolder/region/job/ http://mywebsite.com/myfolder/region/job/add http://mywebsite.com/myfolder/region/job/add/page http://mywebsite.com/myfolder/region/job/page Parameters add and page are optional ... This is what I did $route = new Zend_Controller_Router_Route_Regex( 'myfolder/([^/]+)/([^/]+)/?([^/]+)?/?([0-9]+)?', array('controller' => 'myfolder','action' => 'search'),

prevent merging two module config in Zend Framework 2

送分小仙女□ 提交于 2020-01-06 03:02:09
问题 I have two module in my ZF2 application, both module have different configuration for themself, and both module have different Module.php with different configruation inside it. I have a login process for Admin, which is defined in Module.php like below: in onBootstrap funtion: public function onBootstrap($e) { $e->getApplication()->getEventManager()->getSharedManager()->attach('Zend\Mvc\Controller\AbstractActionController', 'dispatch', function($e) { $controller = $e->getTarget();

how to change zend framework default home page

我只是一个虾纸丫 提交于 2020-01-06 02:59:05
问题 I want to change default home page of zend framework which is application/views/index/index.phtml, to another view. welcome all answers. 回答1: You should not only change the view script to render, but change the "target" (means: module/controller/action). If you look at the Manual , there are options for the configuration (usually application.ini) to set this values 来源: https://stackoverflow.com/questions/4230647/how-to-change-zend-framework-default-home-page

how I add view helper in zend

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-06 02:52:36
问题 I want to add custom view helper in zend framework like this: I placed in application.ini this code: includePaths.library = APPLICATION_PATH "/../library" and create library directory in myproject root create view helper TabEntry.php in library directory class Zend_View_Helper_TabEntry extends Zend_View_Helper_Abstract { public function TabEntry() { } } create another view helper TabEntries.php in library directory class Zend_View_Helper_TabEntries extends Zend_View_Helper_TabEntry { public

Accessing Strings From Zend AMF Objects

☆樱花仙子☆ 提交于 2020-01-06 02:13:59
问题 I'm using Flex 3.6 and ZEND AMF version 1.11 I have an array that shows in my trace using trace(ObjectUtil.toString(event.result)); It outputs as follows: ---This is a Test!--- //The Object Contains... (Object)#0 code = "112" path = "whateverthispathis" Path is: -----End of Test----- In REST we used event.result.data.path to get the path variable. How do I get the path variable via Zend AMF without using XML and out of the PHP array I made posted below? This is the PHP code I'm using to send

Zend Framework 2 - Sessions containing multidimensional arrays

Deadly 提交于 2020-01-05 21:07:52
问题 Suppose i have the following set of data: $foobar = array( "foo" => array ( "foo1" => 1, "foo2" => 2, "foo3" => 3 ), "bar" => array ( "bar1" => 1, "bar2" => 2, "bar3" => 3, ), ); In standard PHP, i could do the following: $_SESSION['foobar'] = $foobar; Then, to call values, by example bar2: $_SESSION['foobar']['bar']['bar2']; But what about doing this in Zend Framework 2? I have already set bootstrap with all parameters for session manager, and container has been set with it. Sessions get