Re: [fw-general] Naming your Namespace

2010-03-26 Thread Jake McGraw
At my company (http://www.targetspot.com) we did something really radical and used our company name: "Targetspot_" Crazy, I know. - jake On Fri, Mar 26, 2010 at 3:31 PM, Rob Allen wrote: > > On 26 Mar 2010, at 16:31, jsuggs wrote: > >> Just curious, but do most people namespace their code acco

Re: [fw-general] Re: Unit Testing with Zend_Test

2010-03-24 Thread Jake McGraw
On Wed, Mar 24, 2010 at 1:09 PM, Joseph Crawford wrote: > > Jake, > > Will I also have to move my Bootstrap.php file into the /tests/application/ > directory or will it know where to find it? No, just establish where your application.ini file is relative to your tests. I typically have a TestHelp

Re: [fw-general] Unit Testing with Zend_Test

2010-03-24 Thread Jake McGraw
Joseph: Within an instance of Zend_Test_PHPUnit_ControllerTestCase: ... public function appBootstrap() { $this->application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' ); $this->application->bootstrap(); $this->getFrontController

Re: [fw-general] Zend_Loader_Autoloader::setZfPath() + application.ini won't ever work

2010-03-19 Thread Jake McGraw
oving the ability to dynamically assign different ZF versions by environment. Thanks for all the help! - Jake On Fri, Mar 19, 2010 at 2:20 PM, Mike A wrote: > On 19 Mar 2010 at 13:22, Matthew Weier O'Phinney wrote: >> -- Mike A wrote >> (on Friday, 19 March 2010, 04:29

Re: [fw-general] Zend_Loader_Autoloader::setZfPath() + application.ini won't ever work

2010-03-19 Thread Jake McGraw
On Fri, Mar 19, 2010 at 2:17 AM, Mike A wrote: > On 18 Mar 2010 at 19:02, Jake McGraw wrote: >> I'd like to use Zend_Loader_Autoloader::setZfPath() and the >> autoloaderZfPath application.ini directive to select a ZF version >> based on Environment, exactly as des

[fw-general] Zend_Loader_Autoloader::setZfPath() + application.ini won't ever work

2010-03-18 Thread Jake McGraw
I'd like to use Zend_Loader_Autoloader::setZfPath() and the autoloaderZfPath application.ini directive to select a ZF version based on Environment, exactly as described here: http://framework.zend.com/manual/en/zend.loader.autoloader.html#zend.loader.autoloader.zf-version What the tutorial fails

Re: [fw-general] Zend_Auth::getInstance()->clearIdentity() doesn't seem to log me out?

2010-03-08 Thread Jake McGraw
On Tue, Mar 9, 2010 at 12:05 AM, Cameron wrote: > > > On Tue, Mar 9, 2010 at 10:49 AM, Jake McGraw wrote: >> >> >> On Mon, Mar 8, 2010 at 8:51 PM, Cameron wrote: >>> >>> Ok, I just tried removing everything except for >>> >>> $data

Re: [fw-general] Validate numbers [Scanned]

2010-03-05 Thread Jake McGraw
You can use Digits and Between: http://framework.zend.com/manual/en/zend.validate.set.html#zend.validate.set.digits http://framework.zend.com/manual/en/zend.validate.set.html#zend.validate.set.between - jake On Fri, Mar 5, 2010 at 4:47 PM, Steve Rayner wrote: > What validators am i supposed to

Re: [fw-general] Zend_Auth::getInstance()->clearIdentity() doesn't seem to log me out?

2010-03-04 Thread Jake McGraw
On Thu, Mar 4, 2010 at 11:39 PM, Hector Virgen wrote: > Anything in your cookies causing you to stay logged in? > > -- > Hector > > > On Thu, Mar 4, 2010 at 7:30 PM, Cameron wrote: >> >> Hi guys, I'm really not sure where I'm going with this one, it seems like >> I must be doing something complet

Re: [fw-general] Unit testing Zend_Forms

2010-01-05 Thread Jake McGraw
On Tue, Jan 5, 2010 at 7:56 PM, Steven Szymczak wrote: > I've just started digging deeper into Zend_Form and I'm interested in how to > go about unit testing them.  I've looked through the PHPUnit docs, > zf-general archives, and Pádraic Brady's blog (briefly) but haven't found > anything extremel

Re: [fw-general] Faltal Error with Controller Action on ZF

2010-01-04 Thread Jake McGraw
Can you show us some code? - jake On Mon, Jan 4, 2010 at 8:36 AM, Jacques Marques wrote: > > Hello, > > When I change anything in my controller and try access it I receive this > message: > Fatal Error: Cannot override final method Zend_Controller_Action::_forward() > ... > > I am using Zend Fra

Re: [fw-general] AjaxContent

2009-12-22 Thread Jake McGraw
Assuming it's Iterable, if not, use type casting first: $res = (array) $res; - jake On Tue, Dec 22, 2009 at 4:46 PM, Jake McGraw wrote: > foreach($res as $field => $value) { >  $this->view->{$field} = $value; > } > > On Tue, Dec 22, 2009 at 4:28 PM, Eugen_cro wrot

Re: [fw-general] AjaxContent

2009-12-22 Thread Jake McGraw
foreach($res as $field => $value) { $this->view->{$field} = $value; } On Tue, Dec 22, 2009 at 4:28 PM, Eugen_cro wrote: > > Hi all, I'm studying AjaxContent helper to stop my previous practice to just > echo things from controller for json responses.. > > Now, I have one question: > > I have a

Re: [fw-general] URL issue with multiple customers sharing the same application

2009-12-21 Thread Jake McGraw
On Mon, Dec 21, 2009 at 11:10 AM, Daniel Latter wrote: > OK thanks for the replies, I understand your reasons but this too seems > unmanageable, say if you have 50 customers, thats 50 databases!!? or am I > missing somthing? > This isn't so terrible, sandboxing accounts to their own databases mak

[fw-general] Using Connection Mock with Zend_Test_PHPUnit_ControllerTestCase

2009-12-18 Thread Jake McGraw
I'm digging into some TDD, and I've managed to convert all of my Models to use Zend_Test_PHPUnit_DatabaseTestCase and it works wonderfully. My question is, is there any way to integrate Connection Mocking, like that with my model testing to work within the Zend_Test_PHPUnit_ControllerTestCase? I s

Re: [fw-general] Survey: Development environment for PHP/ZFW

2009-05-04 Thread Jake McGraw
On Sat, May 2, 2009 at 1:14 PM, howard chen wrote: > Please feel free to answer: > > 1. What OS you are using during development? Windows? Mac? Linux? Mac OSX > 2. Do you edit source code on localhost or remote? i.e. is your > testing environment reside on localhost or remote? Remote > 3. What

Re: [fw-general] Base Controller convenience methods

2009-02-24 Thread Jake McGraw
Steven: To get code completion do something like: /** * @var MyCustomHelper */ protected $myCustomHelper; ... public function init() { ... $this->myCustomHelper = $this->_helper->myCustomHelper; ... } using the @var notation will allow Eclipse to expand any reference. - jake On Tue, Feb

Re: [fw-general] Validating a person's name with Zend Validate

2009-01-07 Thread Jake McGraw
why don't you try the following for the name w/ punctuation uppercase dilemma: preg_replace_callback('/(\b\w)/', create_function('$matches','return strtoupper($matches[1]);'), $string); - jake On Wed, Jan 7, 2009 at 4:37 PM, Philip G wrote: > 2009/1/7 Ja

Re: [fw-general] Validating a person's name with Zend Validate

2009-01-07 Thread Jake McGraw
Philip: Names (especially if you're handling international characters) tend to have a huge sub set of possible characters and users tend to get very pissed off if you develop a pattern that blocks their legal name. My advice to you, check if it's blank, make sure it isn't too long for your databas

Re: [fw-general] What do you use to manage your ZF projects?

2008-12-21 Thread Jake McGraw
My company uses: Mantis + SVN + svk (for branching) Mantis has a really nice plugin for commits that catches "bug " and appends the commit to the bug status. - jake On Sun, Dec 21, 2008 at 2:33 PM, Robert Castley wrote: > Hi, > > Just curious here. I/we currently use Bugzilla & CVS, no f

Re: [fw-general] Re: Conflict between Zend_Session::setSaveHandler(memcache) and session.save_handler=memcache

2008-12-12 Thread Jake McGraw
d,'',$objects[$idx])); } return $return; } and it works. Thanks for the help though. - jake On Fri, Dec 12, 2008 at 2:11 PM, till wrote: > On Fri, Dec 12, 2008 at 7:30 PM, Jake McGraw wrote: >> Update: >> >> Looks like the PECL serialize/unserialize used for stor

[fw-general] Re: Conflict between Zend_Session::setSaveHandler(memcache) and session.save_handler=memcache

2008-12-12 Thread Jake McGraw
, Dec 12, 2008 at 12:31 PM, Jake McGraw wrote: > I'm trying to create a custom Zend_Session save handler that works > with memcache. The code basically goes like this: > > > class Custom_Session_SaveHandler_Memcached implements > Zend_Session_SaveHandler_Interface

[fw-general] Conflict between Zend_Session::setSaveHandler(memcache) and session.save_handler=memcache

2008-12-12 Thread Jake McGraw
I'm trying to create a custom Zend_Session save handler that works with memcache. The code basically goes like this: cache = $cache; } public function read ($id) { if(!($data = $this->cache->load($id))) { return ''; } else { return $data; } } public function write

Re: [fw-general] Extending Zend_View_Helper_Json

2008-09-08 Thread Jake McGraw
seController::init() function works across all my inheriting controllers: public function init() { $this->_helper->getHelper('Json')->suppressExit = TRUE; } - jake > > Christoph > > > > Jake McGraw wrote: > > $this->getHelper('Json')

Re: [fw-general] Extending Zend_View_Helper_Json

2008-09-08 Thread Jake McGraw
nder(); > Zend_Controller_Action_HelperBroker::getStaticHelper('Layout')->disableLayout(); > -- > You can probably do something similar. Just modify the response and disable > viewrenderer and layout. > > I would do the actual logging in a controller plugin (not helper!).

[fw-general] Extending Zend_View_Helper_Json

2008-09-08 Thread Jake McGraw
Hello all, bit of a problem, not sure how to resolve it. We've developed a RESTful JSON API using Zend Framework MVC. The API makes heavy use of the Zend_View_Helper_Json object, each controller, which represents a separate resource does the following when its done processing: $this->_helper->jso

[fw-general] [OT] Throwing an exception from set_error_handler messes up $trace[args]

2008-08-22 Thread Jake McGraw
This isn't necessarily a problem with Zend Framework, but I encountered it while trying to beautify my PHP error screens using ZF MVC. Here's the scenario: I'm using the following code to generate exceptions when an error occurs in PHP: if (!function_exists('exceptions_error_handler')) { functi

Re: [fw-general] Zend_Json::decode in Controller causing Blank Screen of Death

2008-08-15 Thread Jake McGraw
Perhaps some Zend people could provide a perspective? Thanks for all help. - jake On Fri, Aug 15, 2008 at 3:51 PM, Jake McGraw <[EMAIL PROTECTED]> wrote: > Terre: > > Thanks for the effort, but I have also been able to set up a basic > Controller / Layout / View and get

Re: [fw-general] Zend_Json::decode in Controller causing Blank Screen of Death

2008-08-15 Thread Jake McGraw
What needs to happen to the $results data for it to be used on the > layout/view? > > Terre > > -Original Message- > From: Jake McGraw [mailto:[EMAIL PROTECTED] > Sent: Friday, August 15, 2008 1:07 PM > To: Terre Porter; fw-general > Subject: Re: [fw-general] Zend_

Re: [fw-general] Zend_Json::decode in Controller causing Blank Screen of Death

2008-08-15 Thread Jake McGraw
t down to one thing: attempting to json_decode a perfectly valid JSON string, which I've attached, prior to preDispatch(), View, Layout rendering causes blank screen. - jake > > Does the view do anything to the data? i.e. expect a exact array key to > exist? > > Just some t

Re: [fw-general] Zend_Json::decode in Controller causing Blank Screen of Death

2008-08-15 Thread Jake McGraw
error reporting, logging, etc. Just a blank screen. >> Also, this works fine (same JSON) outside of Zend_Controller_Action. >> >> > -Matt >> > >> > On Fri, Aug 15, 2008 at 8:20 AM, Jake McGraw <[EMAIL PROTECTED]> wrote: >> >> >> >&

Re: [fw-general] Zend_Json::decode in Controller causing Blank Screen of Death

2008-08-15 Thread Jake McGraw
sr/local/lib/php/extensions/no-debug-non-zts-20050922/xdebug.so" Again, nothing in error reporting, logging, etc. Just a blank screen. Also, this works fine (same JSON) outside of Zend_Controller_Action. > -Matt > > On Fri, Aug 15, 2008 at 8:20 AM, Jake McGraw <[EMAIL PROTEC

Re: [fw-general] Zend_Json::decode in Controller causing Blank Screen of Death

2008-08-15 Thread Jake McGraw
rvers, so error_reporting, log_errors, everything is set up. - jake > > > On Fri, Aug 15, 2008 at 5:20 PM, Jake McGraw <[EMAIL PROTECTED]> wrote: > >> I've spent the last two days struggling with this error: >> >> We've been utilizing REST-ful JSON se

[fw-general] Zend_Json::decode in Controller causing Blank Screen of Death

2008-08-15 Thread Jake McGraw
I've spent the last two days struggling with this error: We've been utilizing REST-ful JSON server for a couple of months now to host our data api (it's written using Zend Framework). Our client apps access this API, and decode the JSON. Yesterday, one of our client apps stopped working, generatin

Re: [fw-general] Zend_View_Helper_Jquery - Ready for Review

2008-07-17 Thread Jake McGraw
Page not found: http://framework.zend.com/wiki/display/ZFPROP/Zend_View_Helper_Jquery+-+Benjamin+Eberlei - jake On Thu, Jul 17, 2008 at 11:41 AM, Juan Felipe Alvarez Saldarriaga < [EMAIL PROTECTED]> wrote: > Great news! :D > > Like Matthew say, don't care wich JS framework you use if you can u

Re: [fw-general] Recent Component Promotions

2008-07-16 Thread Jake McGraw
> You can find it in the svn repo. It will be compiled and part of the > official 1.6 docs later on, but for now, the code lives in the repository > only (as it is usual for new components. > No proposal documentation? Not that I don't mind digging elbow deep into new code, just thought there woul

Re: [fw-general] Recent Component Promotions

2008-07-16 Thread Jake McGraw
> > I've promoted the following components from standard/incubator/ to > > standard/trunk/ in preparation for the 1.6.0 release: > > > > > > Where is this in the wiki? > > http://framework.zend.com/wiki/display/ZFPROP/Standard+Library I should have been more specific, I'm not seeing any d

Re: [fw-general] Recent Component Promotions

2008-07-16 Thread Jake McGraw
> I've promoted the following components from standard/incubator/ to > standard/trunk/ in preparation for the 1.6.0 release: > Where is this in the wiki? - jake

Re: [fw-general] XML RPC calls no longer working in 1.5, possibly due to server introspection?

2008-07-09 Thread Jake McGraw
> Is this still the case for the 1.5.2 release or current trunk? The > indications on that bug are that it's fixed. > Looking at 1.5.2, looks like this was fixed. - jake > >> > /** >> * FIXME Use this class instead of Zend_XmlRpc_Client until bug is fixed >> * http://framework.zend.com/issues/b

Re: [fw-general] XML RPC calls no longer working in 1.5, possibly due to server introspection?

2008-07-09 Thread Jake McGraw
I believe a lot of folks have been bit by this bug: http://framework.zend.com/issues/browse/ZF-2978 The solution is posted here: http://framework.zend.com/issues/browse/ZF-2978?focusedCommentId=20489#action_20489 Doesn't work because $_lastResponse is a private member so try using this: ht

Re: [fw-general] Zend_Db, pdo_mysql, Transaction Support?

2008-06-25 Thread Jake McGraw
dler that supports transactions. > > /James Dempster > > On Wed, Jun 25, 2008 at 4:56 PM, Jake McGraw <[EMAIL PROTECTED]> wrote: >> >> Here's the code: >> >> http://rafb.net/p/GEpl5468.html (Code paste site) >> >> My problem is that the first in

[fw-general] Zend_Db, pdo_mysql, Transaction Support?

2008-06-25 Thread Jake McGraw
Here's the code: http://rafb.net/p/GEpl5468.html (Code paste site) My problem is that the first insertion is always successfully committed to the database, even when I throw an exception. I've read up on the way pdo_mysql handles "transactions", none of my code performs any task on DDLs, so my qu

Re: [fw-general] Re: Using FlashMessenger to display a message when there was an error processing a form

2008-06-03 Thread Jake McGraw
> My goal with this helper was to be able to leverage a similar interface to > FlashMessenger > for a generic message storage that would persist messages across redirects > _and_ make them available if a redirect did _not_ occur. This is a solution we came up with at company, I'd highly suggest p

Re: [fw-general] Using FlashMessenger to display a message when there was an error processing a form

2008-06-03 Thread Jake McGraw
FlashMessenger is meant for displaying messages only after receiving a second request, like a redirect: FIRST REQUEST Client to Server - POST form values Server - Process form values Server - Form values will cause a redirect, record all messages FlashMessenger Server to Client - Send redirect SE

Re: [fw-general] Gdata and Analytics

2008-05-30 Thread Jake McGraw
Analytics currently doesn't provide an API: http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55561 - jake On Fri, May 30, 2008 at 10:18 AM, Łukasz Wojciechowski <[EMAIL PROTECTED]> wrote: > Hey, > > is it possible to login to analytics with Gdata? I was trying with > > $client

Re: [fw-general] Does headScript() Work Correctly?

2008-05-29 Thread Jake McGraw
I've used headScript with great success, typically, I'll have a layout define my js library and then have each template insert it's particular: layout.phtml: headScript()->prependFile('/js/jquery.js'); ?> ... further down ... headScript() ?> search.phtml: headScript()->appendFile('/js/search.js')

Re: [fw-general] Zend_Registry is good for?

2008-04-24 Thread Jake McGraw
> I was much faster and pratic than any oo way.. By this logic, why are you using any Zend Framework component? Everything Zend does can be accomplished without a single object, just process scripts top to bottom, throw in a couple of conditional includes and put each piece of "functionality" in

Re: [fw-general] Zend Framework and Port based virtual host

2008-04-22 Thread Jake McGraw
> Thanks for the quick reply Jake, > > One think I forgot to mention, I will be receiving some data through this > port (Dow Jones News Wire) in XML format. Is it still possible? > > > > Jake McGraw wrote: > > > I believe you'll want to use Apache Virtua

Re: [fw-general] Zend Framework and Port based virtual host

2008-04-22 Thread Jake McGraw
I believe you'll want to use Apache Virtual Hosts for this, as that is what you would use to process SSL requests on port 443, so putting something similar, with a different port should work: ServerName my.domain.com RedirectPermanent / http://my.domain.com/services/dj Two caveats: Be sure your

[fw-general] Comment on ZF-2978: Zend_XmlRpc_Client returning system.methodSignature

2008-04-11 Thread Jake McGraw
Matthew, anyone watching this issue: The provided solution: class My_XmlRpc_Client extends Zend_XmlRpc_Client { public function call($method, $params = array()) { $request = new Zend_XmlRpc_Request($method, $params); $this->doRequest($request); if ($this->_lastRe

Re: [fw-general] Google App Engine

2008-04-08 Thread Jake McGraw
Technically, support for Zend Framework isn't required, they only need to support PHP to get it working. I sat through the demo, looks promising as an alternative to Amazon storage services. - jake On Tue, Apr 8, 2008 at 10:47 AM, Bradley Holt <[EMAIL PROTECTED]> wrote: > Has anyone else heard ab

Re: [fw-general] FlashMessenger API Documentation?

2008-03-24 Thread Jake McGraw
r and then assigned to the view. I'd just like to know if there is a common way of doing this. - jake On Mon, Mar 24, 2008 at 10:20 AM, Eric Marden <[EMAIL PROTECTED]> wrote: > > From: Jake McGraw > > > For the life of me, I can't find the FlashMessenger document

[fw-general] Re: FlashMessenger API Documentation?

2008-03-21 Thread Jake McGraw
Nevermind, turns out to be a Controller_Helper http://framework.zend.com/apidoc/core/Zend_Controller/Zend_Controller_Action/Zend_Controller_Action_Helper_FlashMessenger.html - jake On Fri, Mar 21, 2008 at 3:15 PM, Jake McGraw <[EMAIL PROTECTED]> wrote: > For the life of me, I can&#

[fw-general] FlashMessenger API Documentation?

2008-03-21 Thread Jake McGraw
For the life of me, I can't find the FlashMessenger documentation in the API browser: http://framework.zend.com/apidoc/core/classtrees_Zend_View.html If it isn't there, where should it be? - jake

Re: [fw-general] Zend Framework 1.5 has landed!

2008-03-17 Thread Jake McGraw
Thanks! On Mon, Mar 17, 2008 at 12:35 PM, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote: > -- Jake McGraw <[EMAIL PROTECTED]> wrote > (on Monday, 17 March 2008, 12:13 PM -0400): > > > http://framework.zend.com/manual/en/zend.gdata.youtube.html >

Re: [fw-general] Zend Framework 1.5 has landed!

2008-03-17 Thread Jake McGraw
http://framework.zend.com/manual/en/zend.gdata.youtube.html Shows up as Japanese for me :(. - jake On Mon, Mar 17, 2008 at 11:57 AM, Tobias Gies <[EMAIL PROTECTED]> wrote: > Hey Matthew, > > > > Actually... that "language switch" is part of the search form. There's > > another box below the li

Re: [fw-general] Zend Framework 1.5 has landed!

2008-03-17 Thread Jake McGraw
woohoo, site search! Much appreciated. - jake On Mon, Mar 17, 2008 at 9:58 AM, Alan Wagstaff <[EMAIL PROTECTED]> wrote: > Thanks to Wil and everyone involved in the Zend Framework project - > downloading it as we speak :-) > > Love the new site as well, looks very "Web 2.0" :-) > > Just one th