Re: [fw-general] Is Cal Evan's Globals.php a recommended approach

2009-01-09 Thread Matthew Weier O'Phinney
-- swilhelm wrote (on Friday, 09 January 2009, 12:26 PM -0800): > > I have been Reading Cal Evan's Guide to Zend Framework Programming. > > In it he describes a Globals.php file for creating a single class to > encapsulate access to global resources like the database connection, cache > connecti

[fw-general] Zend_Log API improvement?

2009-01-09 Thread Matthew Ratzloff
The following is a bit silly: $logger->setEventItem('foo', $foo); $logger->setEventItem('bar', $bar); $logger->setEventItem('baz', $baz); $logger->err('Error message'); Better I think would be two alternatives: $logger->foo = $foo; $logger->bar = $bar; $logger->baz = $baz; $logger->err('Error me

Re: [fw-general] Is Cal Evan's Globals.php a recommended approach

2009-01-09 Thread Karol Grecki
I haven't seen this Globals.php but it sounds something similar to what I use myself. To simplify access to those resources I created a wrapper around Zend_Registry, which handles lazy loading and returns preconfigured components. So all it takes is one line Foo::db()->fetchAll(...) to run some sq

Re: [fw-general] Zend include_path problem on PC

2009-01-09 Thread PHPScriptor
check a few things: - make an empty php file surf to it http://localhost/test.php. Does that work? - did you enable mod-rewrite? - try the suggestion with set_include_path we gave. After the include do a var_dump(get_include_path()); die();. Give us the output. - when is this error given? after w

RE: [fw-general] Is Cal Evan's Globals.php a recommended approach

2009-01-09 Thread Jeremy Brown
In my bootstrap process, via a few plugins, I also setup the application environment bases upon settings in a config.xml file. These 'global' resources (db connection, environment class, etc) are then stored in the registry so that their values and functionality can be accessed later. How do y

Re: [fw-general] Is Cal Evan's Globals.php a recommended approach

2009-01-09 Thread Jason Webster
Eh, That's not really what he meant. You (the original poster) may want to take a look at the proposal that is in the works for Zend_Application. I have been using a Bootstrap/Application class in a couple of proje

RE: [fw-general] Is Cal Evan's Globals.php a recommended approach

2009-01-09 Thread Jeremy Brown
Zend_Registry (http://framework.zend.com/manual/en/zend.registry.html) "is a container for storing objects and values in the application space. By storing the value in the registry, the same object is always available throughout your application. This mechanism is an alternative to using global

Re: [fw-general] Zend include_path problem on PC

2009-01-09 Thread Bruno Friedmann
I'followed your thread and I can't understand why you can't change directly inside the php.ini the include_path line ; Windows: "\path1;\path2" include_path = ".;c:\php5\pear;c:\wanp\frameworks" Just be sure that also the user account under which wamp is running have access to this directory pe

[fw-general] Is Cal Evan's Globals.php a recommended approach

2009-01-09 Thread swilhelm
I have been Reading Cal Evan's Guide to Zend Framework Programming. In it he describes a Globals.php file for creating a single class to encapsulate access to global resources like the database connection, cache connection, config, etc. This seems useful, particularly if you use it in conjuncti

Re: [fw-general] Zend include_path problem on PC

2009-01-09 Thread jarret gabel
thanks for the advice... but for some really annoying reason, i can't get the include path in the error to say anything except include_path=C:\php5\pear so annoying :) any suggestions? i tried that code you suggested but its still messed up :( Bruno Friedmann-2 wrote: > > jarret gabel wrote: >

Re: [fw-general] Zend include_path problem on PC

2009-01-09 Thread Bruno Friedmann
jarret gabel wrote: > i tried all sorts of include_paths in both the bootstrap and in my php.ini > file in my WAMP setup... including a direct link to c:\wamp\www\index.php > and c:\wamp\frameworks\Amf\Server.php > > > My file structure is > > c:\wamp\www and Zend is in c:\wamp\frameworks > >

Re: [fw-general] Zend_Amf_Server - attaching an *instance*

2009-01-09 Thread wadearnold
Darby Felton-2 wrote: > > Excellent! Once this support is released (do you know which version will > contain this support?) and we upgrade to that release, I can remove my > workaround using Zend_Registry. Currently we're using 1.7.2. > It's in the trunk repository so just pull Zend_Amf_Serv

Re: [fw-general] Zend_Amf_Server - attaching an *instance*

2009-01-09 Thread Darby Felton
Hi Wade, Thanks for your response! :) I ended up performing a simple workaround by which the class registered with Zend_Amf_Server fetches the instance needed from Zend_Registry and uses it to build the data for the response. wadearnold wrote: Darby Felton-2 wrote: $server->addFunction(ar

Re: [fw-general] Zend include_path problem on PC

2009-01-09 Thread jarret gabel
i tried all sorts of include_paths in both the bootstrap and in my php.ini file in my WAMP setup... including a direct link to c:\wamp\www\index.php and c:\wamp\frameworks\Amf\Server.php My file structure is c:\wamp\www and Zend is in c:\wamp\frameworks c:\wamp\www\index.php my index.php fil

Re: [fw-general] Zend include_path problem on PC

2009-01-09 Thread PHPScriptor
did you try to set your include path in your php code. Something like thos: set_include_path( dirname(__FILE__) . '/library' . PATH_SEPARATOR . dirname(__FILE__) . '/library/tcpdf' . PATH_SEPARATOR . dirname(__FILE__) . '/app/models' . PATH_SEPARATOR . dirname(__FILE__) . '/app/form

RE: [fw-general] ZF Pear channel / Zend_Tool installation

2009-01-09 Thread Wil Sinclair
There is a very important footnote I'd like to add to all of Ralph's good work. While the focus of 1.8 will be RAD tools which provide much of the functionality that most people consider criteria for a 'framework' nowadays, we are hardly abandoning our use-at-will and component-library-like archite

Re: [fw-general] Testing AMF code with Zend Amf

2009-01-09 Thread wadearnold
Philip G wrote: > > The one that's holding me up from moving right to Zend_Amf is the testing > part. I'm not a flash developer; so developing some flash interface is > currently out of my reach (and time constraints). The amfphp service > browser > is great, and used constantly here to test ou

[fw-general] Zend include_path problem on PC

2009-01-09 Thread jarret gabel
i'm ready to shoot myself here and i was hoping maybe you could shed some light. Zend worked great on my Mac here at work running MAMP. When i went home, i tried using WAMP and Zend on 2 PCs, doing the same successful steps as i did on the Mac... I keep getting a stupid error about not finding c:

Re: [fw-general] Zend_Amf_Server - attaching an *instance*

2009-01-09 Thread wadearnold
Darby Felton-2 wrote: > > $server->addFunction(array($object, 'somePublicAmfResponderFunction')); > I get a terse exception thrown: > "Unable to attach function" > > I think that this is a bug, but I wanted to report here to get feedback > first. Shall I create an issue in JIRA? > That shou

[fw-general] Re[fw-general] ndering pdf's with DomPDF and ZF

2009-01-09 Thread bytte
I'm using DOMPDF to create PDF files from the html that Zend Framework outputs. Here's my code: public function downloadAction() { $this->_helper->layout->setLayout('prints'); require_once("dompdf-0.5.1/dompdf_config.inc.php"); spl_autoload_register('DOMPDF_autoload');

Re: [fw-general] Session arrays

2009-01-09 Thread Ace Paul
PHPScriptor. thanks very much. I had finally found out what I was doing wrong, but they way that you set it out, is much simpler than the method i was using. Brilliant. thank you. PHPScriptor wrote: > > $session = new Zend_Session_Namespace('postfields'); > $fields = $session->resul

[fw-general] Zend_Amf_Server - attaching an *instance*

2009-01-09 Thread Darby Felton
Hi all, I'm starting to work with Zend_Amf_Server, and I'm having some trouble attaching an object *instance*. My code is like: $server = new Zend_Amf_Server(); $server->setClass($object); echo $server->handle(); It seems that in this scenario, Zend_Amf_Server is creating its own separate in

RE: [fw-general] Zend Form Question

2009-01-09 Thread Michael Tramontano
... 'validators' => array( array('StringLength', true, array( 3, 20, 'messages' => array( 'stringLengthTooShort' => 'Names must be at least 3 characters long', ... Is there documentation anywhere for things like this ? Possible option keys/values for

Re: [fw-general] Session arrays

2009-01-09 Thread PHPScriptor
$session= new Zend_Session_Namespace('postfields'); $fields = $session->results; // get the previous postfields array_push($fields,$this->_request->getPost()); // add the new postfields $session->results = $fields; // assign the new postfields session_write_close(); so you get a 2 dimens

[fw-general] Zend Picasa photolist

2009-01-09 Thread phpbrat
When i am running the code below for fetching photlist for a album $query = new Zend_Gdata_Photos_AlbumQuery(); $query->setUser($$username); $query->setAlbumName($albumName); $query->setType("entry");

Re: [fw-general] Zend_Dojo View Helper - how do StackContainer and BorderContainer work?

2009-01-09 Thread Ralf Eggert
Hi again, Ok, I got a working solution now for StackContainer. I just found the view helper Zend_Dojo_View_Helper_Button and got it running. Is there any other way than passing the "dijit.byId('container').back()" command to the "onClick" attribute? Maybe I use the third parameter of the view help

Re: [fw-general] Zend_Dojo View Helper - how do StackContainer and BorderContainer work?

2009-01-09 Thread Ralf Eggert
Hi Matthew, I built a working example for the BorderContainer last night after I sent this message: headStyle('#container-sidebar { width:400px; height:400px; }'); $this->headStyle('#pane-t { background-color: #ccc; }'); $th

Re: [fw-general] Zend Form Question

2009-01-09 Thread Matthew Weier O'Phinney
-- Paul Reinheimer wrote (on Thursday, 08 January 2009, 10:21 PM -0500): > Do you think you could point me in the direction of an example > demonstrating building a form like this > > > class Form_Upload extends Zend_Form > { > public function init() > { > $this->setMethod('post

Re: [fw-general] Question regarding dojo forms rendered in templates called via xhr.

2009-01-09 Thread Mustafa A. Hashmi
On Thu, Jan 8, 2009 at 5:50 PM, Matthew Weier O'Phinney wrote: > On Thursday 08 January 2009 12:22:31 Mustafa A. Hashmi wrote: >> I am in the process of switching our application to make use of dojo >> forms, however, am having some issues with forms which are rendered >> via xhr requests. In a nu

Re: [fw-general] Zend_Date and PHP datetime formats not working with toString()

2009-01-09 Thread jsor
Hello, webPragmatist wrote: > > I'm having an issue... I can't format using the PHP date() function > convention when calling $date->toString() > > Here's what I have: > > $tokenExpiry = new Zend_Date(); >$tokenExpiry->add(3, Zend_Date::DAY); > $tokenExpiry->setTimezone($config->applicati