Re: [fw-general] Setting a layout for a specific module

2010-04-02 Thread Graham Anderson
On Thursday 01 April 2010 15:58:07 Diego Potapczuk wrote:
I'm trying to specify a layout for a module but the old way is not working
anymore, don´t know if something has changed.

The default layout plugin will accept a stack of paths in LIFO order. This 
allows a very simple hack to always ensure that any module can have it's own 
default layout which will automatically override the default module layout.

class App_Controller_Plugin_Layout extends Zend_Controller_Plugin_Layout
{

public function __construct ($layout = null)
{
parent::__construct ($layout);
}

public function preDispatch(Zend_Controller_Request_Abstract $request)
{
// Insert current module layout dir to to overide any default layouts
if ( $request-getModuleName() != 'default' ) {

$layoutPath = APPLICATION_PATH . '/modules/' .
  $request-getModuleName() . '/views/layouts';

$paths = array();
$paths[] = $this-getLayout()-getViewScriptPath();
$paths[] = $layoutPath;

$this-getLayout()-setViewScriptPath($paths);
}
} 
}

Asssuming you set the following application config value:

resources.layout.layout  = default

Now any module with a default.phtml layout will override the default module 
layout.

e.g APPLICATION_PATH/modules/foobar/views/layouts/default.phtml


Cheers the noo,
Graham

-- 
“What can be asserted without proof can be dismissed without proof.”
- Christopher Hitchens


[fw-general] New Proposal: Zend_Db_NestedSet

2010-01-16 Thread Graham Anderson
Greetings and Salutations,

If you are interested in an implementation of storing and retrieving 
hierarchical data as a nested set, please take a few minutes to review my new 
proposal[1]. 

I dusted off some old code and poked and prodded a little until it behaved 
somewhat as expected, there's a functioning prototype on GitHub[2] with some 
basic instructions in the README.

As you probably guessed the algorithm is modified pre-order traversal, and the 
current working functionality is as follows

 * Store single trees or multiple trees in same table
 * Add, move  delete individual tree nodes or tree branches
 * operate on result set nodes(getPath(),getSiblings(),getDescendants(), etc )
 * Result-set as multi-dimensional associative array (Zend_Navigation)
 * Result-set as recursive iterator

Cheers the noo,
Graham

[1]http://framework.zend.com/wiki/display/ZFPROP/Zend_Db_NestedSet+-+Graham+Anderson
[2]http://github.com/gnanderson/ZF_NestedSet


Re: [fw-general] Resource autoloading for modules via Zend_Application

2010-01-14 Thread Graham Anderson
On Thursday 14 January 2010 13:37:02 Simon R Jones wrote:
to partially answer my own question resources.modules[] = did work,
not sure what I was doing.

However, it appears only to work if I have a custom module Bootstrap,
is that expected behaviour since its not clear in the docs? Unless I'm
not reading it properly

You could always do the following in the main bootstrap...


Re: [fw-general] Resource autoloading for modules via Zend_Application

2010-01-14 Thread Graham Anderson
On Thursday 14 January 2010 13:37:02 Simon R Jones wrote:
to partially answer my own question resources.modules[] = did work,
not sure what I was doing.

However, it appears only to work if I have a custom module Bootstrap,
is that expected behaviour since its not clear in the docs? Unless I'm
not reading it properly

Oops... meant to send the following in the last mail. 

The module autoloaders inject themselves in the to the autoloader stack on 
instantiation so the following will add one with default resource 
configuration for each module.

protected function _initModuleLoaders()
{
$this-bootstrap('frontcontroller');
$front = $this-getResource('frontcontroller');
$modules = array_keys($front-getControllerDirectory());

foreach($modules as $moduleName) {
$basePath = APPLICATION_PATH . '/modules/' . $moduleName;
$resourceLoader = new Zend_Application_Module_Autoloader(array(
'basePath'  = $basePath,
'namespace' = ucfirst($moduleName),
));
}
}


[fw-general] Using Zend_Test_PHPUnit_DatabaseTestCase

2009-12-28 Thread Graham Anderson
I have a query maybe some of you can answer, the PHPUnit docs seem to be 
sparse for database test case usage right now.

My extension to Zend_Db_Table for a modified pre-order traversal 
implementation essentially works in two modes. Single tree mode where only one 
tree will be stored in the table and multi-root mode where multiple trees can 
be stored.

I'm preparing a bunch of integration tests and would like to keep the test 
cases for both modes of operation in one test class; but I can't find an easy 
way to override the getDataSet() methods on a per test case basis to load 
differing seed data depending on the mode of operation. Is this something that 
is possible to do fairly easily?

Cheers

-- 
“Experience is the name everyone gives to their mistakes.”
 ☘ Oscar Wilde


Re: [fw-general] Zend_Form save to ini

2009-08-15 Thread Graham Anderson
On Saturday 15 August 2009 07:31:37 UpNow wrote:
now is the edit form, so i should give the form elements their values read
from db.
which method use?
$form-???

Help me! Thanks.:-D

$form-getElement('elementName')
 -setValue('foo');

or 

$form-populate($data);

Also,

http://framework.zend.com/manual/en/zend.form.forms.html#zend.form.forms.elements.values

and,

http://framework.zend.com/apidoc/core/


Re: [fw-general] Zend_Form save to ini

2009-08-14 Thread Graham Anderson
On Saturday 15 August 2009 00:21:06 admirau wrote:
Any chance to convert Zend_Form object to .ini format?
How to achieve this?

http://framework.zend.com/manual/en/zend.form.quickstart.html#zend.form.quickstart.config


Re: [fw-general] Retrieving already bootstrapped resources

2009-07-25 Thread Graham Anderson
On Saturday 25 July 2009 01:09:23 Brenton Alker wrote:
Zend_Registry is iterable, so the easiest way to get every element from
it is to loop over it with a simple foreach on the instance itself.

I had initially done this but I had a couple of legacy objects from pre ZF 1.8 
that were in the registry before zend app is bootstrapped, these are used by 
older modules that I don't have time to refactor at the moment. Hence my 
looking for a way to get a list of resources/objects executed by zend_app's 
bootstrap process.

I have already done what you are proposing - replace the Zend_Registry
with a DI container - by creating a new bootstrap resource, so it
doesn't get loaded until it's triggered by the relevant configuration
directive.

This is the methodology I'm using, the reasoning being I can drop the config 
lines for the container resource in at the end of the resources config section 
so it's executed last.

I've blogged about it here -
http://blog.tekerson.com/2009/07/06/dependency-injection-container-resource-
in-zend-framework/ - I'm using the yadif container, but it shouldn't be hard
 to alter for other containers.

(It's my first attempt at writing a resource, so I'm not sure it's the
best way and any feedback is appreciated.)

Thanks for sharing, my container resource is pretty much similar, I can't 
think of a better way to do this at this time.

Graham


[fw-general] Retrieving already bootstrapped resources

2009-07-24 Thread Graham Anderson
I'd like to inject my own container into Zend_Application, for various reasons 
I'd like to do this at any point from a module bootstrap and not before.

And so; I'd like to get a definitive list of the already bootstrapped 
resources so that I can grab them from the current container (Zend_Registry) 
and push them into my own. At this point I'll inject my container into 
zend_app.

The protected member $_run would be, I think, the ideal list to grab but I 
don't see an accessor for it. Should i just extend the abstract bootstrap or 
is there a way to do this without maintaining my own base bootstrap?

Cheers the noo,
Graham


Re: [fw-general] Zend_Tool does nothing / Zend Framework on MAMP / Mac

2009-07-11 Thread Graham Anderson
On Saturday 11 July 2009 20:40:50 Ralph Schindler wrote:
Do you have display_errors and display_startup_errors on?  If so, do
they show any errors?

I am betting there is something funky going on in your include_path.

I am working on some settings that will fix these sorts of issues on
systems where include_paths might include some, rather- non-standard or
unreliable code.  This will be in 1.9.

Not being a mac user I cant comment on how the standard mac shell works, but I 
did encounter an issue with a few lines of the zf.sh script in my Linux bash 
environment. Please see ZF-7137 though I suspect it may not be related to the 
original problem posted in this thread for reasons outlined below.

wenbert wrote:
 I have tried to setup Zend Framework on my Mac. I do not get zf.sh errors.
 BUT nothing happens when I type “zf.sh” on my terminal/console.

 Here are my settings.
 *Inside my /usr/local/bin*

 wenbert:/usr/local/bin wenbert$ pwd
 /usr/local/bin
 wenbert:/usr/local/bin wenbert$ ls -la zf*
 -rwxr-xr-x   1 wenbert  admin  3004 Jul 11 11:14 zf.php


 PATH=/bin:/sbin:/usr/bin:/usr/sbin
 export PATH

 ZEND_TOOL_INCLUDE_PATH=/Applications/MAMP/bin/php5/lib/php/library
 export ZEND_TOOL_INCLUDE_PATH

It would appear the the location of your ZF tool shell script is *not* in your 
path... Unless your user local .bashrc adds /usr/local/bin to the path env 
variable?


[fw-general] openSUSE/SLES 1.7.3 packages

2009-01-20 Thread Graham Anderson
I'm happy to say that Zend Framework 1.7.3 packages for SUSE Linux Enterprise 
Server (SP2) are now available through the openSUSE build service.

*Additionally, the packages for openSUSE have moved* In order to received 
updated packages through the openSUSE system update applets and services 
please change your zypper/YaST repositories and add the appropriate repository 
for your distribution version.

You can do this automatically in openSUSE by visiting the 1-Click Install URL 
for your version. Alternatively you can perform the operation manually using 
zypper or YaST.

1-Click Install links, URL's, updated details and additional instructions for 
manually installing ZF packages are available on the wiki.

http://framework.zend.com/wiki/display/ZFDEV/Unix+and+Linux+Distribution+Packages

Regards

Graham




Re: [fw-general] Zend_Tool sub forum?

2009-01-06 Thread Graham Anderson
On Tuesday 06 January 2009 19:29:39 Matthew Weier O'Phinney wrote:
 The problem with having discussions for such projects on the regular
 mailing lists is that you get either an overwhelming amount of feedback,
 or you get none at all. It's often more efficient to identify a subgroup
 of dedicated users that offer a spectrum of ideas on the subject and to
 work closely with them for a short time to hammer out requirements --
 and then come back to the lists once that work has been done. This is
 precisely what Ralph has done with Zend_Tool. This can bring a component
 to fruition in a timely manner, instead of languishing in inaction for
 months. Considering how long Zend_Tool has taken even with a focus
 group, I shudder to consider what would have happened had the design
 discussions been opened up to the mailing lists.

I understand that it was intended to be for productive reasons but I have to 
disagree that obscuring it's initial development from view is a help. Surely 
it's the role of the project overseers to direct the discussion and limit any 
meanders in the flow of the proposal? Additionally, if the community tools 
that we currently have are not suited to the task of more focused discussion 
would it not be better to address that for future proposals that have those 
too sharded off for discussion elsewhere?

The immediate thing that springs to mind is a brief discussion on the mailing 
list a while back when someone expressed surprise that there was not more 
interest in Zend_Tool. A very quick reply pointed out that the exposure of the 
proposal was very poor and if not then, but soon after it was mostly off on 
yahoo groups anyway.

 As for you never getting accepted to the group, I'll have Ralph address
 that, but I'm certain it was simply an oversight.

I rather think it was the first of my suspicions, that the request to join the 
group never arrived. 

Believe it or not I have shied away from having a yahoo account for the last 
dozen years or so, it was with regret that I actually had to sign up for one 
to try and join the discussion for Zend_Tool. I distinctly recall fighting 
with yahoos sign up process both with choosing a user name, their password 
policy, their required information and also their verification process. Very! 
Frustrating! Experience! Just! To! Join! A! Discussion! Group!

Needless to say I'm not a yahoo fan, regardless of how many talented engineers 
they have, but that's not the point. The point really is that regardless of 
the requirements of the proposals *process*, it should not be outwith the 
community. Too much of this then we cease to have a community project at all.

Graham


Re: [fw-general] Zend_Tool sub forum?

2009-01-05 Thread Graham Anderson
On Sunday 04 January 2009 18:28:04 Matthew Weier O'Phinney wrote:
 Originally, the Y! group was invite only, to keep the discussions
 targetted. Later, it was to ensure that Zend_Tool discussions could be
 found easily -- we're not sure if we'll do an additional list for just
 Zend_Tool in the future or not, but were not prepared to maintain
 another list internally quite yet.

Not to make too much of this but doesn't this rather defeat the purpose of 
having a community project if it splinters off like this in development stage?

For the record, my application to the yahoo group was never replied to, 
whether this was failure of the request to make it to the group admin, or the 
request being ignored by the group admin I have no idea. Either way is a 
situation which I think is self defeating.

In any case, I think it´s a bad precedent to have projects developed off radar 
by an invite only group.

Graham


[fw-general] openSUSE packages bumped to 1.7.2

2008-12-26 Thread Graham Anderson
Sorry these packages are a few days late, had some issue with the Xen hosts on 
the build service ( plus I was glugging the festive grog these past few days! 
)

ZendX + documentation is included in the php5-ZendFramework-extras package. 
The following reference guide packages have been added by request, html format 
only at the moment, when I have a bit more time i'll add PDF and bump again.

Manual/reference Guide
--

English:  php5-ZendFramework-manual-EN
Deutsch (German): php5-ZendFramework-manual-DE
Français (French):php5-ZendFramework-manual-FR
日本語 (Japanese): php5-ZendFramework-manual-JA
Русский (Russian):php5-ZendFramework-manual-RU
简体中文 (Simplified Chinese): php5-ZendFramework-manual-ZH

Cheers the noo
Graham




Re: [fw-general] Zend Framework 1.7.2 is now available!

2008-12-24 Thread Graham Anderson
On Tuesday 23 December 2008 20:45:12 Wil Sinclair wrote:
 Hi all,

 It is my pleasure to announce the release of Zend Framework 1.7.1! You
 can download this new mini release from the ZF download site:

 http://framework.zend.com/download/latest/

 A list of all issues resolved in this release can be found at:

 http://framework.zend.com/issues/secure/views/IssueNavigator.jspa?reques
 tId=10923

 We'd like to once again thank our generous Zend Framework contributors
 for all the effort they have put in to this release and the project as a
 whole. Enjoy!

 ,Wil

I'm not sure if this was intentional or an error. 

The en manual for ZendX was bundled with 1.7.1 in 
extras/documentation/manual/en but is *not* is not in the release tarball for 
1.7.2

Graham


[fw-general] Zend Framework for openSUSE

2008-12-17 Thread Graham Anderson
Greetings list,

I've just built some rpm packages for openSUSE to be hosted on the openSUSE 
build service.

There are packages for openSUSE 10.3, 11.0 and 11.1

Installation instructions and details are on the wiki as follows. Please note 
the separate packages and instructions for APC/memcache backends and 
PDF/Captcha.

http://framework.zend.com/wiki/display/ZFDEV/Unix+and+Linux+Distribution+Packages

11.1 went GM last week and will be released tomorrow so there are packages 
waiting for it. Sorry no packages for 10.2 this version has gone end of life 
with the last patches for it being shipped last week.

All feedback gratefully received, in future I'll supply meta packages through 
pattern files so that the separation of packages is not such a hassle. With a 
bit of tweaking I'd like to get ZF bundled in the main openSUSE PHP repo.

Cheers the noo
Graham


Re: [fw-general] [Dumb Question] How do I use the URL view helper in my controllers?

2008-12-02 Thread Graham Anderson
On Tuesday 02 December 2008 08:06:52 Cameron wrote:
Hi guys,

The subject line sums it all up. I do some URL generation in the controller
/ model (form submission URLs and so on), and I'd love to be able to use the
same url View Helper that has proven so wonderful in my Views. What's the
trick? I'm sure it's something simple that I'm not smart enough to have
guessed.

There's a controller action helper that provides the same functionality, plus 
a little more.

http://framework.zend.com/apidoc/core/Zend_Controller/Zend_Controller_Action_Helper/Zend_Controller_Action_Helper_Url.html


Re: [fw-general] Dijit Textarea functionality

2008-11-24 Thread Graham Anderson
On Monday 24 November 2008 15:23:34 Daniel Latter wrote:
 Hi,

 I am aware that this element (Dijit Textarea) grows vertically when text is
 added,
 after only specifying a width for the element.

 My observation is that if you don't include a space when typing in the
 textarea, on the first 'line'
 the textarea will not grow vertically and continue to grow horizontally
 indefinitely (as long as you press the key down).

 Is this the correct behaviour and is there a setting I can change to stop
 this from happening?

 OK, I know users may not do this but if there is a way to make it wrap
 without relying on a space being typed
 I would very much like to know.

There was an entry in the dojo bug tracker about this, unfortunately it was 
marked as resolved some time ago but iirc the resolution was just to add some 
conditional checking for safari. This appears to be an issue with firefox and 
possibly safari, if a dijit textarea is wrapped in an li or dd tag (and 
possibly others) then the auto-expand functionality is broken.

As a work around... if you tweak the decorators to wrap the elements in a 
div tag the textarea dijit should behave more consistently.

Graham


Re: [fw-general] Dijit Textarea functionality

2008-11-24 Thread Graham Anderson
On Monday 24 November 2008 17:01:46 you wrote:
 Hi Graham,

 Thanks for the reply.

 Im new to ZF and have added the following line as you suggested, this
 is what I now have:

 $this-addElement(
   'Textarea',
   'message',
   array(
   'label' = 'Message * (will grow 
 automatically)',
   'required' = true,
   'style'= 'width: 200px'
   )
  )-addDecorator('HtmlTag', array('tag' = 'div'));

 But this just wraps the whole form in a div tag, I guess I need to
 remove/overwrite the default decorator? Would be
 grateful of any help

I'm not quite sure why it wraps the whole form using the method above, but 
this should work on the single textarea element.

$this-addElement('Textarea', 'message', array(
'label' = 'Message * (will grow automatically)',
'required' = true,
'style'= 'width: 200px'
)
);
$this-getElement('message')
 -getDecorator('HtmlTag')
 -setOption('tag', 'div');


Graham


Re: [fw-general] Anonymous SVN checkout?

2008-11-13 Thread Graham Anderson
On Friday 14 November 2008 06:45:19 Christian Sanchez wrote:
 Is it unavailable atm?

 I've been trying to access anonymously and it doesn't work

Yes it would seem some config change has borked anonymous checkout for the 
moment.

Graham


Re: [fw-general] Dojo BorderContainer Help

2008-09-29 Thread Graham Anderson
On Friday 26 September 2008 17:02:12 Panman wrote:
 Matthew Weier O'Phinney-3 wrote:
  Yep -- I use it in my pastebin demo:
 
  http://weierophinney.net/matthew/uploads/pastebin-1.0.0.tar.gz
 
  One thing to note: BorderContainer and doctypes don't play well together
  in most cases -- I generally need to omit the DocType declaration when
  using it.

 Do you apply a theme? I've found that when I apply the Tundra theme the
 entire layout dissapears after the page loads.

One thing to watch for is if you are using a local path to dojo rather than 
from CDN. I found i had to explicitly set the dojo module path as well as 
setting the local path to dojo itself.

$view-dojo()-registerModulePath('../dijit', 'dijit');

Also there are a some quirks that seem to cause a layout to not appear, which 
ultimately are *not* bugs in the ZF implementation.

For example if you do not specify the widths of left/right dijit layout areas 
in CSS(outside of a dijit theme) or when you instantiate the dijit layout 
helpers, this can cause the layout to not be visible depending on the rest of 
your style definitions.

Graham




Re: [fw-general] Zend_Layout

2008-09-23 Thread Graham Anderson
On Monday 22 September 2008 18:34:06 Ralph Schindler wrote:
 For a bit more background: why do you have site wide layouts inside
 specific modules?  Shouldn't modules share the same global layout?

 -ralph

Layouts need not be specifically site wide, they may be applicable to a 
certain list of modules. Module's should not be restricted to the same batch 
of global layouts for reasons of re-use and re-distribution.

$layout-setLayout() caters for this to an extent; but like other aspects of 
the MVC I would like to see more options for being module aware.

Graham


Re: [fw-general] Help in zend_auth instances

2008-09-23 Thread Graham Anderson
On Tuesday 23 September 2008 14:44:31 amithasija wrote:
 i want to create multiple instances of zend_auth class

 as i have two modules

 Admin
 Front

 wats happening is when i login into admin it automatically get logins into
 front or vice-versa.


 so wat i want is the i can work on both modules separately after
 simultaneous authentication.

Surely you should authenticate you user only once ( or twice for comparison 
when using admin features ) and use an appropriate set of access controls to 
specify which sections of your site the user is allowed access to. Zend_Acl 
would allow for this type of per resource control.

Graham


[fw-general] FYI: new php framework benchmarks

2008-09-01 Thread Graham Anderson
Article: http://paul-m-jones.com/?p=315

For you lazies...

framework | avg  | rel
--+--+
baseline-html | 2309.14  | 1.7487
baseline-php  | 1320.47  | 1.
cake-1.1.19   | 118.30   | 0.0896
cake-1.2.0-rc2| 46.42| 0.0352
solar-1.0.0alpha1 | 154.29   | 0.1168
symfony-1.0.17| 67.35| 0.0510
symfony-1.1.0 | 67.41| 0.0511
zend-1.0.1| 112.36   | 0.0851
zend-1.5.2| 86.23| 0.0653
zend-1.6.0-rc1| 77.85| 0.0590




Re: [fw-general] Announcing #zftalk.dev ZF developer channel

2008-07-08 Thread Graham Anderson
On Tuesday 08 July 2008 21:54:28 Jurriën Stutterheim wrote:
 Hi all,


 It is my pleasure to announce the #zftalk.dev IRC channel on
 irc.freenode.net! This channel is intended for discussions regarding
 the development of Zend Framework components. Of course, everybody is
 welcome to join in. However, unlike #zftalk, this channel will be a
 bit more strict about staying on-topic. The existing #zftalk channel
 remains and is, as usual, available for asking all ZF related
 questions, or just general (programming ;) chat.


 See you on IRC!


 - Jurriën

I'd just like to add a few points, the #zfdev channel name that was mentioned 
earlier on the mailing list ( albeit in another topic ) will forward to 
#zftalk.dev for your convenience.

For help, support, ideas and discussion about developing *applications* using 
Zend Framework we would hope that #zftalk will still be your first port of 
call if IRC is a convenient resource for you.

For #zftalk.dev a brief synopsis of what might be considered on-topic might be 
helpful.

1. Discussion relating to the ongoing or future development of Zend Framework 
components or Zend Framework tool-chain utilities.

2. Discussion relating to authoring or refining a proposal for inclusion of a 
component of modification to Zend Framework.

3. Discussion relating to contributing to Zend Framework through language 
translation, patch submission, manual authoring or editing.

Please note, that logging was identified as a valuable resource for those that 
could not be there for certain discussions due to their timezone. As such, and 
because of the wish to keep the channel discussion on-topic. Logging will be 
enabled by default, with a search interface to be provided in the near future.

Both #zftalk and #zftalk.dev are community based resources so if you have any 
questions regarding these IRC channels, please ask in this thread or join us 
on irc.freenode.net 


Re: [fw-general] Announcing #zftalk.dev ZF developer channel

2008-07-08 Thread Graham Anderson
On Tuesday 08 July 2008 23:28:24 Pádraic Brady wrote:
 Hi Jurriën,

 By chance is the channel logged for those of us not on IRC except for
 certain times in the evening?

 Best regards,
 Paddy

  Pádraic Brady

 http://blog.astrumfutura.com
 http://www.patternsforphp.com
 OpenID Europe Foundation

Hey Pádraic,

This issue was raised by yourself and others in a previous thread. As the 
focus of this channel will be strongly encouraged to be on-topic, the 
reservations about logging that exists among various people ( myself 
included ) are out-weighed by the benefits that logging brings.

#zftalk.dev *will* be logged by default, with the logs being made public and 
no current plan to allow opt-out. The justification for this being the 
mantra, stay on topic or stay out. We're going provide a search interface for 
logs as soon as possible, not withstanding our current commitments.

My timing on this post may be slightly slow due to my bravely moving some 
maildirs to kmail4 however we look forward to your input once again :D


Re: [fw-general] Announcing #zftalk.dev ZF developer channel

2008-07-08 Thread Graham Anderson
On Wed, Jul 9, 2008 at 1:33 AM, Maurice Fonk [EMAIL PROTECTED] wrote:
 In addition to the points numbered in Graham's mail I would like to add the
 following: A number of channel operators exist for both #zftalk and
 #zftalk.dev, they should ensure some adherence to discussion topics for both
 channels. Because these channels are located on freenode, they shall try to
 follow the guidelines found at http://freenode.net/channel_guidelines.shtml
 . Those of you not familiar with IRC (or the freenode network) might want to
 take a look at this. Especially the points focusing on elitism could be of
 merit. In my humble opinion we should try to avoid the scenario where
 #zftalk.dev is viewed by members of the community as elite (and therefore
 cool). We should value everybody's input in both channels, and kindly
 point them to the separation of topics, should that be necessary.

 Hope to see you there,
 Maurice Fonk

Great point, I think I should also re-iterate something that Wil raised.

While IRC is a great live tool for collaboration, it shouldn't be used at the
exclusion of the other important community resources we have. That is to say,
certain noteworthy or important discussions should be shared and
brought to the attention of the mailing lists / wiki / issue tracker as well.

This is something I hope we will try to encourage.

Cheers the noo,
Graham


[fw-general] www.zend.com

2007-10-12 Thread Graham Anderson
Someone ( at Zend ) is aware that www.zend.com:80 has been timing out 
for the last 4 hours? If so... any E.T.A. for a fix?


Graham


[fw-general] IRC Vs Jabber

2007-10-09 Thread Graham Anderson
Hi list,

Being lazy I like to combine my online resources onto my desktop in as few 
applications as possible. I mainly use IRC to involve myself with the various 
online comunities I'm involved with, with this in mind I had an idea about 
how to combine two great resources for the framework...

There's the official Jabber chatroom hosted by Zend and the community IRC 
channel on freenode network. I would like to develop a messaging bridge 
server between these two resources so that I can use both from my IRC client.

Before I start on this as a personal project I'd like to gauge some public 
opinion on a few things that may influence my design.

Would this be desireable by others apart from myself? If so, what would be the 
design requirements to avoid potential problems from abuse? Would this 
project be something that Zend would approve of, or be discouraged on the 
grounds that the Jabber room is an official Zend resource and a bridge 
may 'pollute' it? Please bear in mind that the community IRC chatroom is 
rarely off-topic and has very active ops/moderators.

There is already IRC-jabber bridge software, some perl scripts and a python 
gateway, would PHP lend itself well to such a task?

Being a seasoned *nix shell scripter I've often thought about porting a few of 
my scripts to PHP so that others at our company could maintain the scripts. 
The company will never be without PHP coders but may not always have 
linux/bsd admins so this project will give me a good feel for what I can and 
cannot move to PHP for sysadmin.

Cheers,
Graham


Re: [fw-general] PEAR repository

2007-09-27 Thread Graham Anderson
On Thursday 27 September 2007 20:24:28 Jean-Lou Dupont wrote:
 What is the address of the PEAR repository for the Zend Framework?
 I have tried 'pear channel-discover pear.zfdev.com' to no avail.

 Help please,
 Jean-Lou Dupont.

There's no PEAR channel, afaik.

You can checkout from the SVN repo though...

http://framework.zend.com/svn/framework/

Latest release:
http://framework.zend.com/svn/framework/tag/release-1.0.2/


Re: [fw-general] latest release breaks system

2007-09-26 Thread Graham Anderson
On Wednesday 26 September 2007 17:32:42 Daniel Rossi wrote:
 Hi there i believe the latest release breaks the system here is the
 message i get

 Uncaught exception 'Zend_Exception' with message 'File true.php was
 not found'
 in /Volumes/FIREWIRE/www/classes/ZendFramework/library/Zend/
 Loader.php:159 Stack trace: #0 /Volumes/FIREWIRE/www/classes/
 ZendFramework/library/Zend/Loader.php(91): Zend_Loader::loadFile
 ('true.php', Array, true) #1 /Volumes/FIREWIRE/www/classes/
 ZendFramework/library/Zend/Db/Adapter/Abstract.php(334):
 Zend_Loader::loadClass('true') #2 /Volumes/FIREWIRE/www/classes/
 ZendFramework/library/Zend/Db/Adapter/Abstract.php(227):
 Zend_Db_Adapter_Abstract-setProfiler('true') #3 /Volumes/FIREWIRE/
 www/classes/ZendFramework/library/Zend/Db.php(252):
 Zend_Db_Adapter_Abstract-__construct(Array) #4 /Volumes/FIREWIRE/www/
 html/index.php(29): Zend_Db::factory('pdo_mysql', Array) #5 {main}
 thrown in /Volumes/FIREWIRE/www/classes/ZendFramework/library/Zend/
 Loader.php on line 159

Please see my reply to: [fw-general] Zend_Loader issue on ZFW 1.0.2

Cheers
Graham


Re: [fw-general] Zend_Loader issue on ZFW 1.0.2

2007-09-26 Thread Graham Anderson
On Wednesday 26 September 2007 17:25:40 Juan Felipe Alavarez Saldarriaga 
wrote:
 And this is my index_db.php script code:

 // Load DB info
 $arrDbConfig = array(
   'host' = $objConfiguration-database-host,
 'username' =
 $objConfiguration-database-username, 'password' =
 $objConfiguration-database-password,
   'dbname'   = $objConfiguration-database-name,
   'profiler' = 
 $objConfiguration-database-profiler
   );

 // Set connection to the database.
 $objDb = Zend_Db::factory( $objConfiguration-database-type, $arrDbConfig
 );

or alternatively now you can just pass a single Zend_Config object:

$db = Zend_Db::factory($this-_appConfig-database);

 snip 
         database
             adapterPdo_Mysql/adapter
             params
            dsn/dsn
            hosthost/host
            dbnamedbname/dbname
            usernameusername/username
            passwordpassword/password
            profiler
            enabledtrue/enabled
            /profiler
             /params
         /database
 /snip 


[fw-general] wiki down

2007-09-21 Thread Graham Anderson

Please restart, thanks :)


[fw-general] Wiki

2007-09-20 Thread Graham Anderson

Somebody please charge to maximum volts and apply the paddles...




Re: [fw-general] getting start of month with Zend_Date

2007-09-14 Thread Graham Anderson

Thomas Weidner wrote:

What about the following:

$current = new Zend_Date();
$begin = $current-setDay(1);


Thanks Thomas, didn't see that method!


Re: [fw-general] Select Dropdown List

2007-09-07 Thread Graham Anderson

Kexiao Liao wrote:

Are there any classes in the Zend Framework which can create the Dropdown
list automatically from the control vocabulary shored in the DataBase
tables? One example of the dropdown list shown below:

select style='width:300px;' id=hx_smoke name=hx_smoke size=1 
option value=No selected No /optionbr/option value=.A 
Not Applicable to this Case or Patient/optionbr/option value=.F 
Not Found in Chart/No Response to Follow-up/optionbr/option value=.L 
Lost Chart/Lost to Follow-up/optionbr/option value=.P  Pending

Data/optionbr/option value=.R  Not Recorded in Chart or Follow-up
Response/optionbr/
/select

The contents of the above option part come from the control vocabulary
stored in a database table.  



The view helper class Zend_View_Helper_FormSelect can achieve this for you.

http://framework.zend.com/apidoc/core/Zend_View/Helper/Zend_View_Helper_FormSelect.html

Regards
Graham


[fw-general] Wiki...

2007-07-20 Thread Graham Anderson

Is once again visiting the great bit bucket in the sky...

This seems always to happen between certain times, could this be related 
to some other back-end operation during the night, or is it just some 
tomcat/confluence issue?


Re: [fw-general] Re: Zend_Validate_Alnum and Zend_Validate_Alpha failing(ZF1.0RC3)

2007-06-27 Thread Graham Anderson
On Wednesday 27 June 2007 18:38:07 Darby Felton wrote:
 Hi Josh,

 It's already filed as:

 http://framework.zend.com/issues/browse/ZF-1641

 We can post further comments and results there for further investigation.

 Best regards,
 Darby

Hiya,

I can't post to JIRA at the moment so this will have to do in the meantime.

From testing on my platforms ( openSUSE/SUSE-OSS 10.0, 10.1, 10.2 ), I have 
the following results:

Up to ( but not including ) apache2-mod_php5-5.2.0-10.rpm testing against the 
PCRE expression in current Zend_Filter_Alnum passes.

From mod_php5 version that ships with openSUSE 10.2 ( 5.2.0-10 ) to the 
current available in the openSUSE build service, ( 5.2.3-29.1 ), testing 
against the pattern fails.

On openSUSE mod_php5-5.2.0-10 and greater is built against the system PCRE 
library and not the PHP bundled one, on opensuse 10.2 this is pcre-6.7-21. 
While  patterns with UTF-8 options match against this system library outside 
of PHP; they do not, for whatever reason match when used inside of PHP.

Workaround, on openSUSE 10.2 an upgrade of the system PCRE to the latest 
available from the openSUSE build service ( pcre-7.1-16 ) will allow pattern 
matching inside of PHP to function as expected.

Cheers
Graham


Re: [fw-general] Zend_Validate_Alnum::isValid evaluating alnum strings as false

2007-06-22 Thread Graham Anderson

Darby Felton wrote:

Hi Graham,

I just added the potentially offending data to the unit tests for
Zend_Validate_Alnum, but I have been unable to reproduce the problem on
either of the two following platforms:

* PHP 5.1.4, WinXP, PCRE 6.6

* PHP 5.2.1, Ubuntu, PCRE 6.7

Are you on FreeBSD by chance?

Anyone else experiencing such a problem?

On another note, I would highly recommend upgrading your PHP beyond
5.2.0, which introduced some problems that have since been addressed in
later releases.

Same result with 5.2.3 , PCRE 6.7, opensuse 10.2 x86

Attached is CLI config, problem exists in apache module also. I'll make 
some enquiries to the opensuse lists and see if anything turns up.


Regards,
Graham




phpinfo()
PHP Version = 5.2.3

System = Linux excession 2.6.18.8-0.3-default #1 SMP Tue Apr 17 08:42:35 UTC 
2007 i686
Build Date = Jun 12 2007 13:11:19
Configure Command =  '../configure' '--prefix=/usr' 
'--datadir=/usr/share/php5' '--mandir=/usr/share/man' '--bindir=/usr/bin' 
'--with-libdir=lib' '--includedir=/usr/include' '--sysconfdir=/etc/php5/cli' 
'--with-config-file-path=/etc/php5/cli' 
'--with-config-file-scan-dir=/etc/php5/conf.d' '--enable-libxml' 
'--enable-session' '--with-mm' '--with-pcre-regex=/usr' '--enable-xml' 
'--enable-simplexml' '--enable-spl' '--enable-filter' '--disable-debug' 
'--enable-inline-optimization' '--disable-rpath' '--disable-static' 
'--enable-shared' '--program-suffix=5' '--with-pic' '--enable-cli' 
'--with-pear=/usr/share/php5/PEAR' '--enable-bcmath=shared' 
'--enable-calendar=shared' '--enable-ctype=shared' '--enable-dbase=shared' 
'--enable-dom=shared' '--enable-exif=shared' '--enable-ftp=shared' 
'--enable-mbstring=shared' '--enable-mbregex' '--enable-pcntl=shared' 
'--enable-posix=shared' '--enable-shmop=shared' '--enable-soap=shared' 
'--enable-sockets=shared' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' 
'--enable-sysvshm=shared' '--enable-tokenizer=shared' '--enable-wddx=shared' 
'--with-zlib=shared' '--with-bz2=shared' '--with-curl=shared' 
'--with-gd=shared' '--enable-gd-native-ttf' '--with-xpm-dir=/usr' 
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' 
'--with-zlib-dir=/usr' '--with-gettext=shared' '--with-gmp=shared' 
'--enable-hash=shared' '--with-iconv=shared' '--with-imap=shared' 
'--with-kerberos' '--with-imap-ssl' '--enable-json=shared' '--with-ldap=shared' 
'--with-ldap-sasl=/usr' '--with-libedit=shared,/usr' '--with-mcrypt=shared' 
'--with-mhash=shared' '--with-ming=shared,/usr' '--with-mysql=shared,/usr' 
'--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=shared' 
'--with-ncurses=shared' '--with-unixODBC=shared,/usr' '--with-openssl=shared' 
'--with-pgsql=shared,/usr' '--with-pspell=shared' '--with-snmp=shared' 
'--with-xmlrpc=shared' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' 
'--with-xsl=shared' '--with-tidy=shared,/usr' '--enable-dba=shared' 
'--with-db4=/usr' '--without-gdbm' '--with-cdb' '--with-inifile' 
'--with-flatfile' '--with-qdbm=/usr' '--enable-pdo=shared' 
'--with-pdo_sqlite=shared,/usr' '--with-pdo-mysql=shared,/usr' 
'--with-pdo-pgsql=shared,/usr' '--with-pdo-odbc=shared,unixODBC,/usr' 
'--with-sqlite=shared,/usr' '--enable-sqlite-utf8' '--enable-zip=shared' 
'--enable-suhosin=shared' '--disable-cgi'
Server API = Command Line Interface
Virtual Directory Support = disabled
Configuration File (php.ini) Path = /etc/php5/cli
Loaded Configuration File = /etc/php5/cli/php.ini
Scan this dir for additional .ini files = /etc/php5/conf.d
additional .ini files parsed = /etc/php5/conf.d/bz2.ini,
/etc/php5/conf.d/ctype.ini,
/etc/php5/conf.d/dom.ini,
/etc/php5/conf.d/gd.ini,
/etc/php5/conf.d/hash.ini,
/etc/php5/conf.d/iconv.ini,
/etc/php5/conf.d/json.ini,
/etc/php5/conf.d/mbstring.ini,
/etc/php5/conf.d/mcrypt.ini,
/etc/php5/conf.d/mhash.ini,
/etc/php5/conf.d/mysql.ini,
/etc/php5/conf.d/mysqli.ini,
/etc/php5/conf.d/pdo.ini,
/etc/php5/conf.d/pdo_mysql.ini,
/etc/php5/conf.d/pdo_sqlite.ini,
/etc/php5/conf.d/posix.ini,
/etc/php5/conf.d/sqlite.ini,
/etc/php5/conf.d/suhosin.ini,
/etc/php5/conf.d/tidy.ini,
/etc/php5/conf.d/tokenizer.ini,
/etc/php5/conf.d/xmlreader.ini,
/etc/php5/conf.d/xmlwriter.ini,
/etc/php5/conf.d/zlib.ini

PHP API = 20041225
PHP Extension = 20060613
Zend Extension = 220060519
Debug Build = no
Thread Safety = disabled
Zend Memory Manager = enabled
IPv6 Support = enabled
Registered PHP Streams = php, file, data, http, ftp, compress.bzip2, 
compress.zlib  
Registered Stream Socket Transports = tcp, udp, unix, udg
Registered Stream Filters = string.rot13, string.toupper, string.tolower, 
string.strip_tags, convert.*, consumed, bzip2.*, convert.iconv.*, zlib.*


This server is protected with the Suhosin Patch 0.9.6.2
Copyright (c) 2006 Hardened-PHP Project


This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Suhosin v0.9.20, Copyright (c) 2002-2006, by Hardened-PHP Project


 

[fw-general] Zend_Validate_Alnum::isValid evaluating alnum strings as false

2007-06-21 Thread Graham Anderson
I updated against trunk and now...

require_once('Zend/Validate/Alnum.php');

$validator = new Zend_Validate_Alnum();

$vars = array ( 'Alnum' = 'foobar1',
'NotAlnum' = '[EMAIL PROTECTED]' );

foreach ( $vars as $var ) {
echo $validator-isValid($var) ? $var .':true ' : $var . ':false ';
}

--
result: foobar1:false [EMAIL PROTECTED]:false
--

php5 -v
PHP 5.2.0 with Suhosin-Patch 0.9.6.1 (cli) (built: May  8 2007 20:00:45)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
with Suhosin v0.9.10, (C) Copyright 2006, by Hardened-PHP Project


Re: [fw-general] Zend Framework Applications Questionnaire

2007-06-15 Thread Graham Anderson
On Friday 15 June 2007 22:13:04 Bill Karwin wrote:
 Hi, I'm relaying this for our marketing team:

 Thanks to all the hard work the community has put in we are just about
 ready to release Zend Framework 1.0  As part of this release we will be
 doing significant updates to the website and other outreach. 

This is good news indeed.

I have a query thought about the website changes, will this affect just the 
front 'face' of the framework website or will there be changes to the 
URL/(URI) locations of the more developer focused resources?

Specifically i'm thinking about the JIRA xml feeds...

cheers
G



Re: [fw-general] Unofficial add-on classes repository

2007-06-13 Thread Graham Anderson
On Wednesday 13 June 2007 06:27:41 back-2-95 wrote:
 Hi!

 Could there be some place within Zend Framework sites where users could
 submit unofficial classes to use with Zend Framework.

I think a couple of people might have been working on somethingn seperately. 
You could drop by #zftalk on freenode IRC and ask. At least there's been some 
conversation about it there recently...

Cheers
G


[fw-general] ZF Wiki

2007-06-08 Thread Graham Anderson

Morning...

Wiki ( http://framework.zend.com/wiki/display/ZFDEV/Home ) seems down at 
the moment, can anyone confirm?





Re: [fw-general] session expriy

2007-06-08 Thread Graham Anderson

Tony Harrison wrote:

Hello, I'm having a problem getting session expire times right. This is
the code in bootstrap:

Zend_Session::setOptions(array('remember_me_seconds' = 7776000,
   'save_path' =
/home/seklco/tmp/sessiondata,
   'use_only_cookies' = 0));
Zend_Session::start();
Zend_Session::rememberMe();

The problem is that rememberMe() causes the session id to be regenerated
on each request. Which I don't want to happen. Is there any way to stop
the session id changing?

Kind Regards,
Tony Harrison
Hair Supermarke

Hi Tony,

You could instantiate a session namespace with a pre-determined name ( 
this calls session start ) and set the expiration timout on the namespace.


   $session = new Zend_Session_Namespace($this-_appConfig-name);
   
$session-setExpirationSeconds($this-_appConfig-session_timeout);
  
You may want to then insert the namespace object into the registry.


   $registry = Zend_Registry::getInstance();
   $registry-set('session', $session);

The namespace object has magic getter/setter methods so to set/get 
session data it would be simply


   $session = Zend_Registry::get('session');
   $session-foo = $bar;
   $bar = $session-foo;

Personnaly I would normally prefer session ID regeneration for tighter 
security, rememberMe() regenerates the ID because it replaces the 
session cookie with a new one that expires X seconds in the future. 
However to answer your question about not regenerating ID's I'd have to 
poke about in the code or API docs...


Cheers
G


Re: [fw-general] 1.0 RC2 release

2007-06-08 Thread Graham Anderson

HongSheng Wu wrote:

:) check out on svn

=RELEASE 1.0.0RC2 / 07-Jun-2007 / based on revision 5181 =


Best Regards

Great stuff, just in time for the weekend...

Thanks Bill!
G


Re: [fw-general] PHP 5.1.2 vs. 5.1.4

2007-05-16 Thread Graham Anderson

Nico Edtinger wrote:

[15.05.2007 22:59] Matthew Weier O'Phinney wrote:
Well, one thing offerred in 5.1.4 not in 5.1.2 is the Countable 
interface.


According to http://php.net/ChangeLog-5.php#5.1.0 and 
http://www.php.net/~helly/php/ext/spl/interfaceCountable.html it was 
added in 5.1.0.


nico

We currenly test against 5.1.2, 5.1.6 and 5.2.x while the current 
release works just fine against 5.1.2 ( and countable is available in 
SPL in 5.1.2 ) though there are obvious reasons for not using it.


The significant problems we have is our clients who want to run 5.0.x ( 
Red Hat / centOS mainly ), I've no idea what the latest version 
available for those platforms is but I can tell you from first hand 
experience that trying to work around the lack of countable interface in 
5.0.x is a non starter.


Cheers
G



Re: [fw-general] Zend_Mime - encodeQuotedPrintable Bug?

2007-04-02 Thread Graham Anderson

Mario Knippfeld wrote:

Hi,

in Zend/Mime.php on line 142 there seems to be a bug:

if the length of var $ptr is 2 and $pos = 0, there will be an infinite 
loop.



Mario, as far as I'm aware this is fixed in 0.9.1

regards
Graham


Re: [fw-general] Zend_Mime - encodeQuotedPrintable Bug?

2007-04-02 Thread Graham Anderson

Olivier Sirven wrote:

Hi,

It is a known problem, there is already a JIRA issue reporting the problem 
here:

http://framework.zend.com/issues/browse/ZF-1120
  


Ah yes I see, I stand corrected.

infinite loop bug ZF-1058 was fixed for 0.9.1, not this one...