RE: [fw-general] ZF Open Source Project: Example of Best Practices?

2009-12-09 Thread swilhelm

Any word from Forest regarding ZF core component use in current release and
where find the 2.0 repository?

- Steve W.


wllm wrote:
 
 From what Forrest has told me, he follows Zend's recommendations for
 best practices to the letter.
 
 I'm CC'ing Forrest in so he can say for sure, but he's currently working
 on getting the code and infrastructure ready for public consumption.
 
 ,Wil
 
 -Original Message-
 From: swilhelm [mailto:st...@studio831.com] 
 Sent: Thursday, December 03, 2009 11:40 AM
 To: fw-general@lists.zend.com
 Subject: RE: [fw-general] ZF Open Source Project: Example of Best
 Practices?
 
 
 Thanks Wil.
 
 You mentioned Digitalus, http://digitaluscms.com. It seems like it might
 be
 the best example open source project running on ZF.  They mention
 version
 2.0 is under development and will take advantage of more core ZF
 components,
 but I can not find a public source repository containing version 2.0.
 
 - Steve W.
 
 
 
 
 wllm wrote:
 
 Simplecloud.org currently runs on EC2 and the next generation of
 Digitalus. It's even using components of Zend_Service_Amazon and the
 Simple Cloud API- it's 'cloud native', so to speak. J I may be able to
 open-source the code, but I'd have to talk with Forrest
 (creator/maintainer of DigitalusCMS) first.
 
 I'm also working on an app called the Simple Cloud Explorer that is
 designed to demo SCAPI in action. This will definitely be open-sourced
 and liberally commented/documented, but I can't make any promises on
 the
 release date.
 
 ,Wil
 
 
 
 -- 
 View this message in context:
 http://n4.nabble.com/ZF-Open-Source-Project-Example-of-Best-Practices-tp
 787830p947922.html
 Sent from the Zend Framework mailing list archive at Nabble.com.
 
 

-- 
View this message in context: 
http://n4.nabble.com/ZF-Open-Source-Project-Example-of-Best-Practices-tp787830p956690.html
Sent from the Zend Framework mailing list archive at Nabble.com.


RE: [fw-general] ZF Open Source Project: Example of Best Practices?

2009-12-03 Thread swilhelm

Thanks Wil.

You mentioned Digitalus, http://digitaluscms.com. It seems like it might be
the best example open source project running on ZF.  They mention version
2.0 is under development and will take advantage of more core ZF components,
but I can not find a public source repository containing version 2.0.

- Steve W.




wllm wrote:
 
 Simplecloud.org currently runs on EC2 and the next generation of
 Digitalus. It's even using components of Zend_Service_Amazon and the
 Simple Cloud API- it's 'cloud native', so to speak. J I may be able to
 open-source the code, but I'd have to talk with Forrest
 (creator/maintainer of DigitalusCMS) first.
 
 I'm also working on an app called the Simple Cloud Explorer that is
 designed to demo SCAPI in action. This will definitely be open-sourced
 and liberally commented/documented, but I can't make any promises on the
 release date.
 
 ,Wil
 
 

-- 
View this message in context: 
http://n4.nabble.com/ZF-Open-Source-Project-Example-of-Best-Practices-tp787830p947922.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] ZF - Where to begin?

2009-11-25 Thread swilhelm

I want to second this post. I have used ZF for some projects earlier this
year and I am right on the cusp of making a major decision: explore ZF 1.9
more deeply or abandon ZF and PHP altogether for Ruby on Rails.

ZF Documentation seems almost passive aggressive, providing examples to get
started, but lacking enough information to build, test, and deploy
production quality, maintainable websites.

Maybe it's a case of the grass is always greener on the other side of the
fence but Ruby and RoR seem to be better suited to quickly and easily
develop production quality websites. 

I don't want to start a ZF vs RoR discussion, though that might be
interesting. I would like to hear how others have become proficient in
building production websites using ZF.

- Steve W.


Fozzyuw wrote:
 
 Hi all,
 
 I've been watching and playing with ZF for some time now.  Never very
 deeply at any given time and often putting it down for extended periods of
 time (version releases).
 
 One thing that keeps happening is that ZF is growing quickly.  Which is
 good, but it's also hard to keep up.
 
 
 

-- 
View this message in context: 
http://n4.nabble.com/ZF-Where-to-begin-tp787666p787731.html
Sent from the Zend Framework mailing list archive at Nabble.com.


[fw-general] ZF Open Source Project: Example of Best Practices?

2009-11-25 Thread swilhelm

Prompted by Fozzyuw's latest post, I will approach the issue from a different
tack.

I am looking open source projects that exemplify the best practice use of
the Zend Framework and its advanced features.  Ideally these projects would:

+ be under active development
+ be based on ZF 1.9
+ leverage reusable modules
+ incorporate Auth and ACL (bonus points for OpenId or Facebook Connect
support)
+ provide Zend_Test-based unit tests 
+ deploy from a source repository (e.g. git or svn)
+ achievs scalability using multiple server load balancing
++ get bonus points they are currently running in production on a cloud
platform like EC2 

Any recommendations?

- Steve W.
-- 
View this message in context: 
http://n4.nabble.com/ZF-Open-Source-Project-Example-of-Best-Practices-tp787830p787830.html
Sent from the Zend Framework mailing list archive at Nabble.com.


[fw-general] Where have all the ZF questions gone?

2009-11-13 Thread swilhelm

It seems like the number of daily ZF questions posted to this forum is
declining; it appears to average less than a dozen per day.  I would have
thought with all the new features added this year, questions would be on the
rise not declining.

Has the ZF development community moved to another forum?

- Steve W.
-- 
View this message in context: 
http://old.nabble.com/Where-have-all-the-ZF-questions-gone--tp26340774p26340774.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Creating CLI scripts utilizing ZF

2009-10-28 Thread swilhelm

I would also like to see a good example of this. 

Do your CLI scripts require authentication or ACL support? If so, are you
handling that as well?

- Steve W.


 
 So i think the crux of this for me is  that Im thinking there has to be a
 good way to leverage the functionality of the normal Zend_Application
 bootstrapping process just for the CLI environment - im just not sure of
 what that *should* look like in general implementation.
 
 

-- 
View this message in context: 
http://www.nabble.com/Creating-CLI-scripts-utilizing-ZF-tp26084241p26098104.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Is the book Is Zend Framework: The Off icial Programmer’s Reference Guide based on ZF v1.9?

2009-10-08 Thread swilhelm

Is the 
http://www.amazon.com/exec/obidos/tg/detail/-/1430219068/ref=ord_cart_shr?_encoding=UTF8m=ATVPDKIKX0DERv=glance
book , Zend Framework: The Official Programmer's Reference Guide base on ZF
1.9?

- Steve W.
-- 
View this message in context: 
http://www.nabble.com/Is-the-book-Is-%22Zend-Framework%3A-The-Official-Programmer%E2%80%99s-Reference-Guide%22-based-on-ZF-v1.9--tp25813410p25813410.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Is there anybody from Zend team ?

2009-09-18 Thread swilhelm

I love the Zend Framework's functionality, but so much of how all the
necessary components hang together in a production quality Website is
difficult to discern. 

I would like to get all of the following configured and working before I
write a single line of application specific code: configuration specified,
connect to stub data store that include user login and user role tables,
load reusable utility modules, enforce user roles and authentication across
the utility modules, include an admin module, enable caching, provide
command-line maintenance scripts, expose a subset of the stub data store via
a REST api, include a test harness, and manage dev, staging, and production
versions of a Website.

Right now doing the above seems like a very daunting task using the Zend
Framework. I know some will say not all projects need the above, but I would
say almost all production Web sites do. Some would say this would be very
hard to do without Zend Framework, and I would agree. 

Buy if there are Websites in production using ZF, they must have solved many
if not all of these issues. Why do we all have to reinvent the wheel?

- Steve W.


Matthew Ratzloff wrote:
 

 Framework can't be flexible. If somebody needs flexibility then he can
 
 programming in normal PHP without framework. :-)
 
 
 This is an opinion, one to which Zend Framework does not subscribe.  There
 are plenty of PHP frameworks which do subscribe to this opinion.  And
 there's always Rails, which I like, but is very, very different from Zend
 Framework.
 
 I encourage you to change your approach to Zend Framework, rather than
 expecting Zend Framework to change its approach.  You will be much happier
 without preconceived ideas of how you think the framework should be.
 
 -Matt
 
 On Wed, Sep 16, 2009 at 9:16 AM, aoohralex aoohra...@gmail.com wrote:
 

 One year ago I knew one person who used Zend Framework. One day he had to
 modify (add something) somebody's website wrote in Zend Framework but he
 had
 to write everything from the beginning. He was then very angry and he
 said
 me why. Do you know ?

 Bacause ZF was so flexible that somebody created this website in horrible
 way - he said me that everything was wrong, it wasn't MVC and he faster
 create this website from the beginning then modify it.

 Framework can't be flexible. If somebody needs flexibility then he can
 programming in normal PHP without framework. :-)
 --
 View this message in context:
 http://www.nabble.com/Is-there-anybody-from-Zend-team---tp25455352p25475740.html
 Sent from the Zend Framework mailing list archive at Nabble.com.


 
 

-- 
View this message in context: 
http://www.nabble.com/Is-there-anybody-from-Zend-team---tp25455352p25518320.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Is there anybody from Zend team ?

2009-09-15 Thread swilhelm

If these issues caused @aoohralex problems, I can't wait to see his post
regarding modules, ACL, form decorators, doing a db join, 

- Steve W.


joedevon wrote:
 
 If you do not want to register, if you scroll down further on the page,
 you'll find direct links.
 
 I bet if Zend did some clickstream analysis, you guys would be shocked
 how many people never see the links on the bottom of the page. I
 remember the first time I wanted to find out more about Zend
 Framework, I thought you had to register and even had the feeling that
 it might cost money. It's only because it was part of a project I was
 hired for that I eventually learned it.
 
 I thought it was only me, but as co-organizer of the PHP Meetup in
 L.A., more than one person told me it cost money to download.
 
 As an experiment, I just now tried to pretend I know nothing about
 Zend Framework and Googled it, went to the download page, and indeed
 it's confusing for newbies if they click Full package.
 
 This might be affecting adoption rate more than you'd think. I'd
 suggest more prominent direct links at every stage including the
 registration page...see if the download numbers are affected.
 
 Just my take.
 
 (One of the biggest changes of my thinking as a web developer came
 after speaking to a few marketing pros who analyze the hell out of
 clickstreams, I learned that the littlest thing on a page can have a
 drastic effect on success of a site.)
 
 

-- 
View this message in context: 
http://www.nabble.com/Is-there-anybody-from-Zend-team---tp25455352p25466127.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: Re: [fw-general] Best to use CLI in my ZF 1.9 Application

2009-09-01 Thread swilhelm

The issue I have had in the past is when a CLI is trying to leverage an admin
module that uses the standard Auth / ACL logic. It expects a login process
to populate some username and password information that get passed to the
Auth code.  

It would be nice to see the best practice for having an admin module
provide behavior to both a Web-based UI as well as the CLI scripts.

- Steve W.


lightflowmark wrote:
 
 OK, I can certainly look at that.
 
 Generally, you'd set the file permissions on the script so it can only be
 run by the specified user(s) -  so, for instance:
 shell# chown admin_user:admin_group myScript.php
 shell# chmod 744 myScript.php
 shell # ls -al
 -rwxr--r-- 1 admin_user admin_group 3212 Apr 17 1999 myScript.php
 
 (can only be executed by the admin_user user)
 
 Is this not possible in your setup for some reason?  I'm not very familiar
 with shared hosting setups, so is there something that would prevent you
 doing this?
 
 Thanks for the input,
 Mark
 
 
 
 
 swilhelm wrote:
 
 should optionally require admin credentials passed as arguments or should
 confirm CLI is being run by particular system users (e.g. root).
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Best-to-use-CLI-in-my-ZF-1.9-Application-tp25045676p25240779.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Best practices, environment setup

2009-08-31 Thread swilhelm

I would also be interested in such 'best practices.' 

I am using a git repository and deploying to media temple and slicehost
hosted staging and production servers. 

I would also be interested in seeing how people develop a single admin
module that can be leveraged across several different websites (that is to
say the code is shared, but the roles, application contollers and user
databases differ across sites).

- Steve W. 


Themselves wrote:
 
 I've been looking for something like this too. It's all well and fine to
 install all the Zend products with the intention of integrating them in to
 a
 homogenous whole, but the reality is that there's very little in the way
 of
 documentation looking at the problem from a broader development
 perspective.
 I'm trying to nut my way through and develop my own series of best
 practices
 with regards to all this, but my particular sticking point is still the
 Zend
 Server to Zend Studio integration, which seems to be focused around using
 your local machine as the development server - a situation which obviously
 doesn't scale terribly well. I've tried finding some good examples of
 using
 external Zend Server instances via a local Zend Studio, but so far,
 nothing...
 
 On Fri, Aug 28, 2009 at 5:28 AM, Robert Gormley rgorm...@mgcare.com
 wrote:
 
  Has anyone got a good pointer to a resource, or able to offer some
 advice, on a ‘best practices’ set-up for ZF, Server, for use with
 Studio...
 Something that’s nicely organized and elegant. Things like


- nice ways to address development and test environments on the same
server (use of Apache ENV for example, or hostname)
- awareness of multiple sites on the same server
- other common best practices, like ‘root of the project’ being
 outside
the web root, etc


 I realize these are all fairly common/well-known things, but I’m trying
 to
 find a nice document/blog, what have you, that does a good job of
 encapsulating a lot of these ‘best practices’.

 Robert

 
 

-- 
View this message in context: 
http://www.nabble.com/Best-practices%2C-environment-setup-tp25180222p25230154.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: Re: [fw-general] Best to use CLI in my ZF 1.9 Application

2009-08-31 Thread swilhelm

should optionally require admin credentials passed as arguments or should
confirm CLI is being run by particular system users (e.g. root).


lightflowmark wrote:
 
 I'm actually working on a proposal to do exactly this at the moment.
 
 What features would people like to see on this?
 
 Currently, the proposed Zend_Schedule component will:
 1)  be run via CLI scripts from the cron
 
 2)uses Zend_Application to load the bootstrap of an existing
 application to load config, include paths, etc.
 
 3)load user-written classes which define tasks - e.g. mailTasks,
 databaseTasks, etc.
 
 4)run functions from those classes based on a prefix - e.g. you might
 have a script running every day which runs all functions prefixed 'daily',
 which would run mailTasks::daily_Emails(),
 databaseTasks::daily_DoArchiving(), etc. and another script running every
 hour which would run all functions prefixes 'hourly' 
 
 It's actually very simple to implement as outlined, and I'd be interested
 to see what other features people would want from this.
 
 Yours,
 Mark
 
 
 
 
 Raphael Stolt-2 wrote:
 
 Hi Stefan,
 
 
 
 
 You might also take a look at Zend_Tool_Project_Providers which allow you
 to
 create custom providers which handle the scenarios you described in the
 first mail. Plus by hooking them into the Zend Tool environment you can
 call
 them as desired via CLI.
 
 Hope that helps a bit.
 
 Cheers,
 
 Raphael Stolt
 
 2009/8/20 Stefan Sturm stefan.s.st...@googlemail.com
 
 Hello,

 I found this tutorial to setup a cli enviroment:

 http://webfractor.wordpress.com/2008/08/14/using-zend-framework-from-the-command-line/

 But I would like to use Zend_Application to handle this...

 Perhaps somebody can help me on this.

 Thanks and greetings,
 Stefan Sturm

 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Best-to-use-CLI-in-my-ZF-1.9-Application-tp25045676p25230433.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Framework admin system scaffolding

2009-08-20 Thread swilhelm

+1 on this request.


luoshiben wrote:
 
 Hi All,
 
 I'm about to ramble on in regards to what I need and why, but for those
 who don't want to read =), here's my question:
 
 Does anyone know of a framework or tool set that sits on top of Zend
 Framework to assist developers in quickly creating a members only or
 admin-type system?
 
 
 **
 Now, if you're still reading, here's my qualification of that question.
 
 I don't know if anyone else is like me, but over the last 10 years or so
 I've had to build a good number of admin or members-only systems for
 companies I have worked for, side projects, or just hobby sites. I'm
 talking about the web-based system that managers log into on an intranet
 to view reports, or the back end system that authorized personnel might
 log into to manage data of some type. While I've employed different
 methodologies (and even various web frameworks) in each case to get the
 job done, I've never felt like the perfect solution has been found. I've
 either had to build the system from scratch, or take something that was
 over-done, strip out the fat, and code in the missing features. Basically,
 the problem is that I want a framework that comes with standard
 components running out-of-the-box, but one that still gives me full
 control, flexibility, and robustness as a developer. In other words, I
 want a component library with MVC like Zend Framework, but with a few of
 the running-out-of-the-box features that might be found in a CMS. (Insert
 something about getting cake and eating it too. No framework name pun
 intended...)
 
 More specifically, in regards to these standard components, I'm sure
 that opinions vary widely and everyone will have their list of must-haves.
 What I envision is a bare-bones, ready-to-deploy system (for use of a
 better word) that comes with an application development framework at the
 base layer, and a few pre-built features already running on the framework.
 These features would include a simple website, with authentication page, a
 post-authentication default landing page, and a page or pages (crud
 systems) to manage users and privileges, along with the underlying
 role-based access control architecture. A website navigation class or
 component might be helpful, too. Basically, I want the shell or
 scaffolding of my system to be in place. Then, all I have to do is start
 building controllers/actions/models/views/etc for my specific business
 logic, plug actions into the nav system, and I'm running -- all without
 having to reinvent the wheel on the same features that are standard every
 time I have to undertake this sort of project, namely rbac architecture
 and authentication and access management.
 
 Ok, so maybe I've presented a pretty simplistic view of what the system
 could look like. There are obviously all sorts of issues, different ways
 of doing things, and a multitude of diverse requirements from project to
 project, even for the base components I have suggested. However, even if
 customization or extending were required, I still say that the basic
 feature set -- however they finally get implemented -- ends up being
 pretty much the same.
 
 The closest thing I've found to this so far is the 
 http://yiiframework.com Yii framework . At this point, however, I need to
 standardize on Zend Framework. Therefore, after all of that, I repeat my
 real question: Does anything exist that sits on top of Zend Framework to
 assist developers in quickly creating a members only or admin-type
 system?
 
 I'm not really looking for conceptual thoughts on the matter. What I'd
 really love are links to ZF-based frameworks, projects, or extensions,
 etc. that are being used right now, or examples of how you've used ZF to
 get the required features described running quickly so that you could
 concentrate on the more important (and more specific) business logic end
 of things.
 
 Thanks in advance for any feedback or examples that you might have.
 Cheers!
 

-- 
View this message in context: 
http://www.nabble.com/Zend-Framework-admin-system-scaffolding-tp25057216p25057569.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Is it possible to have library code under module directory in ZF?

2009-08-03 Thread swilhelm

Did you getting any direct responses? Did you resolve this problem? 

Would be interested in hearing the solution.

- Steve W.



dmitrybelyakov wrote:
 
 I've been fighting it for the whole day now, and it doesn't get any more
 clear for me.
 
 The idea is simple, i want to have my library code under one of my module
 directories. Like this:
 
 /application/modules/somemodule/
 /application/modules/somemodule/controllers
 /application/modules/somemodule/models
 /application/modules/somemodule/views
 /application/modules/somemodule/library
 /application/modules/somemodule/library/Exception.php
 
 I would like it to follow ZF naming conventions and have class names
 prefixed with a vendor namespace like this: 
 
 Shift_Exception extends Exception {
 }
 
 Is it possible to setup autoloader somehow to accomplish this?
 
 What i've tried and what doesn't work:
 
 1. Putting the library on the include path and regestering corresponding
 namespace (need to put my libary code inside another directory 'Shift')
 
 2. Registering Resource_Autoloader and adding resources - this one seems
 better and it allows loading resources from subfolders if they were
 correctly added with addResourceType(), but it doesn't seem to work for
 the files in the library folder itself, in other words with just the base
 Shift_ prefix.
 
 
 So to state it even more simple: how to autoload namespaced classes from
 specified folder??
 
 
 I would REALLY appreciate any help or advise here as it is starting to be
 kind of urgent.
 Dmitry.
 
 

-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-have-library-code-under-module-directory-in-ZF--tp24778500p24794074.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Framework + Doctrine Module Autoloader issue

2009-07-09 Thread swilhelm

I would really like to see an example of Doctrine integrated as a module as
well. 

- Steve W.


dbroderick wrote:
 
 I am using ZF 1.8.4 and Doctrine 1.1.2 with a module directory setup of
 
 
 +---application
 |   +---configs
 |   \---modules
 |   +---default
 |   |   +---controllers
 |   |   \---views
 |   |   \---scripts
 |   |   +---error
 |   |   \---index
 |   +---error
 |   |   +---controllers
 |   |   \---views
 |   |   \---scripts
 |   |   \---error
 |   \---user
 |   +---controllers
 |   +---models
 |   |   \---generated
 |   \---views
 |   \---scripts
 |   \---index
 +---library
 |   \---App
 |   \---Application
 |   \---Resource
 +---public
 |   +---images
 |   \---themes
 |   \---default
 |   \---css
 \---tests
 +---application
 \---library
 
 
 I have a resource file called Doctrine.php in my library folder which does
 the following:
 
 
 $zla = Zend_Loader_Autoloader::getInstance();
 $zla-unshiftAutoloader( array( 'Doctrine', 'autoload' ), 'Doctrine'
 )-setFallbackAutoloader( true );
 
 
 $manager = Doctrine_Manager::connection( $this-_getConnectionString() );
 $manager = Doctrine_Manager::getInstance();
 $manager-setAttribute( Doctrine::ATTR_MODEL_LOADING, 
 Doctrine::MODEL_LOADING_CONSERVATIVE );
 $manager-setAttribute( Doctrine::ATTR_PORTABILITY,
 Doctrine::PORTABILITY_NONE );
 $manager-setAttribute( Doctrine::ATTR_AUTOLOAD_TABLE_CLASSES, true );
 $manager-setAttribute( Doctrine::ATTR_USE_DQL_CALLBACKS, true );
 $manager-setAttribute( Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, true );
 
 
 My config xml file has this:
 
 
 --- snip ---
 
 
 pluginPaths
   
 App_Application_Resource![CDATA[App/Application/Resource]]/App_Application_Resource
   /pluginPaths  
   resources
   frontController
   
 defaultmodule![CDATA[default]]/defaultmodule
   params
   
 prefixDefaultModule![CDATA[true]]/prefixDefaultModule
   
 usedefaultcontrolleralways![CDATA[false]]/usedefaultcontrolleralways
   /params
   /frontController
   modules
   default![CDATA[default]]/default
   error![CDATA[error]]/error
   user![CDATA[user]]/user
   /modules
   !-- Doctrine application plugin --
   doctrine
   dbtype![CDATA[dbtype]]/dbtype
   dbhost![CDATA[localhost]]/dbhost
   dbname![CDATA[dbname]]/dbname
   dbuser![CDATA[dbuser]]/dbuser
   dbpass![CDATA[dbpass]]/dbpass
 /doctrine   
   !-- View application plugin --
   view![CDATA[view]]/view
   /resources
 
 
 --- snip ---
 
 
 The default Module Autoloader is loaded correctly during bootstrapping,
 making available the default resource types (form, model, dbtable), but I
 use Doctrine so dbtable is not used and I would like to insert, override
 or even replace the default resource type(s) with a folder in models that
 Doctrine uses which is 'generated'.
 
 
 My preference is that when my Resource Plugin which configures Doctrine as
 my DB layer, also can inject the needed resource type into the default
 module autoloader, in order to make the configuration available in all
 modules.
 
 
 I have tried for the past day to get this to work but all of the examples
 I find are to create a module autoloader in the module bootstrap file
 which means (as I understand it) that I have to do this for each module
 bootstrap.
 
 
 I am still new to Zend and struggling a bit with the changes in v1.8, so I
 may have just missed the example that shows how this is done.
 
 
 Of course my ultimate problem here is that when I try to load a model
 User.php in the models folder which extends generated\BaseUser.php, the
 BaseUser class is not found.
 
 Thanks,
 David
 

-- 
View this message in context: 
http://www.nabble.com/Zend-Framework-%2B-Doctrine-Module-Autoloader-issue-tp24392765p24414344.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend Framework book or real world example based on v1.8?

2009-07-09 Thread swilhelm

I have been using ZF 1.7 for my last couple of projects. I am looking for a
book or a good real world example of v1.8.

Looking for a book or example that incorporates: modules, auth  acl
controlling module-based behavior, cli or rest read/write access to some of
the data (again with auth  acl control), zend test, and doctrine
integration.

Thanks in advance for any pointers.

- Steve W.

-- 
View this message in context: 
http://www.nabble.com/Zend-Framework-book-or-real-world-example-based-on-v1.8--tp24414473p24414473.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Default Module - Bootstrapping and Models

2009-06-26 Thread swilhelm

I agree, modules (and auth and acl) should be added to the QuickStart or some
other Zend provided example. I can't think of any real world application
that will not need these three additional capabilities.

- Steve W.


Vince42 wrote:
 
 Hi,
 
 Dalibor Karlović schrieb:
 I think we should rethink this as it's obvious many people use the
 default module just like any other so the behavior should be as
 expected, even if adding an additional option.
 
 I circumvented this odd behaviour with
 
http://paste2.org/p/284720
 
 but I think that this is ugly and - if not provided otherwise - ZF
 should treat the default module exactly as you described it and
 everybody would expect it to work.
 
 Unfortunately the Quickstart is omitting the module topic - and I really
 think that the module approach should be enforced as it leaves much more
 room for flexibility, self-contained / autarchic modules etc ... just my
 two cents. :)
 
 -- 
 Cheers,\\|//
 Vince  (o o)
 ooO-(_)-Ooo-
  '''   (o)_(o)[ ][0][ ]
  ô¿ô   (=°o°=)   World Domination by Copy and Paste   [ ][ ][0]
   -()_()[0][0][0]
 
  ()  ascii ribbon campaign - against html e-mail
  /\  www.asciiribbon.org   - against proprietary attachments
Ooo.
 ---.ooO(  )-
(  )(_/
 \_)
 
 
  
 

-- 
View this message in context: 
http://www.nabble.com/Default-Module---Bootstrapping-and-Models-tp24211701p24222781.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] User Registration and Login Management Module - Best Practice Blueprint or Example for 1.8

2009-06-10 Thread swilhelm

Thanks for the Auth / Acl suggestions. 

My choice of subject header may have been misleading. I am more interested
in how people separate their code into a modules, particularly modules whose
data and UI must be tightly integrated into the final project.

User id's and locale information for example will need to be accessed by
application specific UI's and included in application specific schemas. 

Administration, reporting, archiving and other similar functions seem
perfect candidates for being modules, but would like to see how others have
done so successfully.

- Steve W.


dmitrybelyakov wrote:
 
 
 
 swilhelm wrote:
 
 I would like see best practice blueprint or example for implementing
 modules in 1.8.  
 
 A user registration and login management module would be ideal.
 
 Any suggestions? Thanks in advance.
 
 - Steve W.
 
 
 Hi,
 
 I am at the moment reading an article/tutorial on how to implement and
 Auth/Acl system with Zend. Sp here is the link:
 http://codeutopia.net/blog/2009/02/06/zend_acl-part-1-misconceptions-and-simple-acls/
 
 It has 3 parts of tutorial going from simple hardcoded  acl with
 users/usergroups/permissions
 to building dynamic access control. Hope that helps.
 
 
 
 Dmitry.
 

-- 
View this message in context: 
http://www.nabble.com/User-Registration-and-Login-Management-Module---Best-Practice-Blueprint-or-Example-for-1.8-tp23952440p23972955.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] User Registration and Login Management Module - Best Practice Blueprint or Example for 1.8

2009-06-09 Thread swilhelm

I would like see best practice blueprint or example for implementing modules
in 1.8.  

A user registration and login management module would be ideal.

Any suggestions? Thanks in advance.

- Steve W.
-- 
View this message in context: 
http://www.nabble.com/User-Registration-and-Login-Management-Module---Best-Practice-Blueprint-or-Example-for-1.8-tp23952440p23952440.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] modules and Zend_Tool

2009-06-05 Thread swilhelm

What is the status of Zend_Tool module support?


Matthew Weier O'Phinney-3 wrote:
 
 -- David Mintz da...@davidmintz.org wrote
 (on Friday, 01 May 2009, 01:19 PM -0400):
 I've googled around quite a bit and not been able to figure this out: 
 what is
 the currently recommended way of creating modules in a project using
 Zend_Tool?
 Or creating a modular project to begin with?
 
 The support doesn't exist yet. Ralph almost has it ready for people to
 start testing; look for an announcement soon.
 
 I've created a monomodular project with 'zf create project' and I am
 tempted to
 muck around with the folder hierarchy by hand, but that would surely
 break 
 .zfproject.xml
 
 -- 
 Matthew Weier O'Phinney
 Project Lead| matt...@zend.com
 Zend Framework  | http://framework.zend.com/
 
 

-- 
View this message in context: 
http://www.nabble.com/modules-and-Zend_Tool-tp23336769p23881234.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] How to get an application resource inside a controller action

2009-05-26 Thread swilhelm

I predict we will see this question every so often until the bootstrap
becomes more directly accessible, like the view.

So in a controller's action method, something like:

$this-bootstrap-db;

would be nice.

- Steve W.


Matthew Weier O'Phinney-3 wrote:
 
 -- Vladas Diržys vladas.dir...@gmail.com wrote
 (on Tuesday, 26 May 2009, 09:40 PM +0300):
 what is the right way to get a db (or any other) resource in the
 controller?
 Now I'm using following line:
 $this-getFrontController()-getParam('bootstrap')-getResource('db');
 
 Is there a better way?
 
 Within your controller, yes, there's an easier way:
 
 $this-getInvokeArg('bootstrap')-getResource('db');
 
 -- 
 Matthew Weier O'Phinney
 Project Lead| matt...@zend.com
 Zend Framework  | http://framework.zend.com/
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-get-an-application-resource-inside-a-controller-action-tp23728917p23732100.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Session::regenerateId timing issue in Safari and IE

2009-04-27 Thread swilhelm

It appears I have the same
http://www.nabble.com/concerned-about-regenerating-id-td13896143.html#a13896143 
issue reported back in Nov 2007 by Ergo. 

I want to regenerate the session id on every request as recommended in the
documentation, but there seems to be a timing problem on Safari and IE. If
users make several requests very quickly, the session is lost.

Ergo suggests a work around, namely calling PHP's session_regenerate_id()
directly without the true argument. This seems to work for me, but it
appears Zend_Session::regenerateId() stores some internal state that will
not be set using this approach.

My questions is, should I call session_regenerate_id() directly or is there
some other recommended solution?

- Steve W.
-- 
View this message in context: 
http://www.nabble.com/Zend_Session%3A%3AregenerateId-timing-issue-in-Safari-and-IE-tp23270303p23270303.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] What is this: ?= $this-layout()-sidebar ?

2009-04-13 Thread swilhelm

You may wish to read this very interesting 
http://blog.astrumfutura.com/archives/373-The-M-in-MVC-Why-Models-are-Misunderstood-and-Unappreciated.html
article  by Padraic Brady on Models and their role in the MVC pattern.  

I think the section entitled, Models are Classes, Controllers are
Processes, is germane to the design of a sidebar. You might consider
implementing your sidebar as a Model or set of Models that are rendered
using View Partials, possibly one Model / View Partial pair per sidebar
feature (e.g. blogroll, ad unit, etc.).

- Steve W.


Jason DeBord wrote:
 
 Thanks for the replies.
 
 I created a SidebarController with a sidebarAction() function. In
 sidebar.phtml I have coded the template for my sidebar. Next, I registered
 this with the actionstack like this:
 
 $this-_helper-actionStack('nav', 'nav','default');
 $this-_helper-actionStack('sidebar', 'sidebar','default');
 
 This is not a good solution however, because I would have to use the
 actionstack in all of my contollers. I want to control what is in the
 sidebar from the SidebarController.
 
 I think I can code a Front Controller Plugin??? That will take care of
 this
 for me... Maybe?
 
 I'm struggling with this step though. Any advice?
 
 Cheers,
 
 J
 
 
 On Mon, Apr 13, 2009 at 12:38 PM, Vadim Gabriel vadim...@gmail.com
 wrote:
 
 Hey,

 Or you could simply overload it.

 $layout-sidebar = something here;

 Vince.


 On Mon, Apr 13, 2009 at 1:31 PM, lightflowmark
 1...@lightflowinterrupted.com
  wrote:


 They are placeholders for content to be later inserted into.

 Typically, I think, you would have actions called e.g. sidebarAction and
 navAction.  In each of these you would have a line like
$this-_helper-viewRenderer-setResponseSegment('sidebar');


 You would then add these actions to the actionStack, so that on any
 request,
 these two actions were called in addition to your main action.

 Sorry that's a bit terse, but should help you get started.







 Jason DeBord wrote:
 
 
 http://framework.zend.com/manual/en/zend.layout.quickstart.html#zend.layout.quickstart.example
 
  In the above link, what are ?= $this-layout()-nav ? and ?=
  $this-layout()-sidebar ?
 
  Are they view helpers? Would someone point me to a resource describing
 how
  to build one? For example, a template of a sidebar that would be
 called
 by
  ?= $this-layout()-sidebar ? .
 
  Thanks.
 
 

 --
 View this message in context:
 http://www.nabble.com/What-is-this%3A-%3C-%3D-%24this-%3Elayout%28%29-%3Esidebar--%3E-tp23011364p23020557.html
 Sent from the Zend Framework mailing list archive at Nabble.com.




 --
 Vincent Gabriel.
 Lead Developer, Senior Support.
 Zend Certified Engineer.
 Zend Framework Certified Engineer.





 
 

-- 
View this message in context: 
http://www.nabble.com/What-is-this%3A-%3C-%3D-%24this-%3Elayout%28%29-%3Esidebar--%3E-tp23011364p23033371.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend View vs. Smarty

2009-03-28 Thread swilhelm

I found this blog 
http://hasin.wordpress.com/2008/01/05/once-upon-a-time-there-was-smarty/
post  by Hasin Hayder very compelling.


Andrei Iarus wrote:
 
 Hello there,
  
 A lot have been discussed, but anyway it is still difficult to decide. A
 project is to be developed, and more persons will have to work at it.
 Those persons will have some experience in ZF and probably also in Smarty.
 The problem is: what are the advantages and disadvantages of using ZF
 Template Engine vs. Smarty. How much of you use Smarty? Why do you prefer
 Smart/Zend_View? 
  
 I see as advatages for Zend_View:
 1. Some packages from ZF use Zend_View (Zend Layout, Zend Form, other
 examples?), so if we would use Smarty and use those packages (which we'll
 do), we will need to extend the abstract classes. Also it is possible that
 new comming features will use Zend_View.
 2. Easier to learn than Smarty (right?), as it is clean PHP.
  
 As an advantage for Smarty:
 1. It is more popular than Zend_View (right?) .
 2. It has those built-in common-used functions (ex. excaping functions).
 3. One can say it is easier/more pleasant to develop in Smarty (it is for
 a long time a stand-alone V(iew) component (from MVC) )
  
 What would you decide if you were in my place?
  
 Thank you very much in advance.
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Zend-View-vs.-Smarty-tp22705952p22754388.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Best coding practice? Form takes too long to load now.

2009-03-03 Thread swilhelm

Try running the  Firebug profiler, Zend_Db_Profiler_Firebug, to see if its
the database queries are the culprit. I assume you already have indices
defined for the playground_id and device_id columns.

Might be time to switch to a data table like display (e.g. YUI DataTable)
containing a list of all devices with one of the columns being a link to an
device edit form which can simply be a separate page or with a bit more
work dynamically displayed and populated using AJAX. 

Populating the data table could then be done with a single select call that
does a join across playgrounds and checkpoints.

- Steve W.


bytte wrote:
 
 I have a form class that creates form elements based on database
 information. The problem is that the form takes more than 20 seconds to
 load on my localhost. On the web server it's even worse: the form doesn't
 load at all because of limited memory resources.
 
 I was hoping you guys could give me some tips on optimizing my form setup.
 The web application I'm working on is an online park administration tool
 for a company that repairs playground equipment for its clients. Every few
 months the company needs to check the status of the playground equipment.
 They can do that by filling in the form that loads form fields based on a
 few predefined checkpoints.
 
 Eg. Is there still enough sand in the area around the playground device?
 etc.
 
 I have a database with a clients table, a playgrounds table, a equipment
 table and a checkpoints table. Every client owns a few playgrounds. Every
 playground consists of some devices (equipment). And every device has a
 few checkpoints that need to be checked. Basically the form displays input
 fields for every checkpoint for every device for every playground of that
 particular client.
 
 Currently I query the playgrounds table to find all playgrounds the logged
 in client owns.
 Then for every playground I display a subform.
 In the subform I have another subform for every playground device.
 Then I query the database to find the checkpoints for every device.
 Based on those checkpoints the form displays some form fields in the
 devices subform.
 
 Of course I use a lot of foreach() loops to be able to display all
 necessary form fields.
 
 foreach($playgrounds as $playground) {
 $devices =
 $playgrounds-fetchAll($playgrounds-select()-where('playground_id =
 ?',$playground-id);
 foreach($devices as $device) {
 $checkpoints =
 $checkpoints-fetchAll($checkpoints-select()-where('device_id =
 ?',$device-id);
 foreach($checkpoints as $checkpoint) {
 //create form fields
 }
 }
 }
 
 
 I found that if there's less checkpoints the form loads way quicker. I was
 wondering if there's a better way of coding in order to have the form load
 faster.
 

-- 
View this message in context: 
http://www.nabble.com/Best-coding-practice--Form-takes-too-long-to-load-now.-tp22309252p22313192.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] lastInsertId()

2009-03-03 Thread swilhelm

To expand on jason's comment, adding a call to getAdapter() should fix it.

$contactPersonId = $dbAdvertiserPerson-getAdapter()-lastInsertId();



jasonistaken wrote:
 
 The insert() method of Zend_Db_Table returns the new primary key for the
 row.
 The lastInsertId() method only exists of Zend_Db_Adapter classes, not the
 Table class.
 
 On 27/02/2009 12:30 PM, Bob O wrote:
 FYI..all 3 tables have auto_incrementing id fields that are PK's
 and when all parts pertaining my problem

 i am able to submit all of the other information correctly..



 Bob O wrote:
 Im having a heck of a time with this one..I have searched high and low,
 and what has seemed to be a remedy isnt working for me..

 any help would be great

 I have 1 form and 3 tables that i submit to with 1 post.
 These tables are joined by ids

 here is my code

  public function createAdvertiser($values, $resellerId)
  {
$now = time();
$niceName =
 FonRoots_Utilities::toNiceString($values['advertName']);

$personData = array('id' =  null,
'username' =  $values['username'],
'status' =  $values['status'],
'role' =  $values['role'],
'first_name' =  $values['first_name'],
'last_name' =  $values['last_name'],
'email' =  $values['person_email'],
'title' =  $values['job_title'],
'address' =  $values['personAddress1'],
'address2' =  $values['personAddress2'],
'city' =  $values['personCity'],
'state' =  $values['personState'],
'country' =  $values['personCountry'],
'postal_code' = 
 $values['personPostalCode'],
'area_code' =  $values['personAreaCode'],
'phone' =  $values['personPhone'],
'cell_area_code' =
 $values['personCellAreaCode'],
'cell_phone' =  $values['personCellPhone'],
'date_created' =  $now
);
$dbAdvertiserPerson = new Person();
$dbAdvertiserPerson-insert($personData);

 -- My code breaks here..The Person is added
$contactPersonId = $dbAdvertiserPerson-lastInsertId();-- I dont
 think this is working?


$locationData = array('id' =  null,
  'address' =  $values['locationAddress1'],
  'address2' =  $values['locationAddress2'],
  'city' =  $values['locationCity'],
  'state' =  $values['locationState'],
  'country' =  $values['locationCountry'],
  'postal_code' =
 $values['locationPostalCode'],
  'area_code' = 
 $values['locationAreaCode'],
  'phone' =  $values['locationPhone'],
  'hours_of_operation' =
 $values['hoursOfOperation'],
  'date_created' =  $now
);

$dbAdvertiserLocation = new Location();
$dbAdvertiserLocation-insert($locationData);
$locationId = $dbAdvertiserLocation-lastInsertId();

$advertiserData = array('id' =  null,
'advertiser' =  $values['advertName'],
'nice_name' =  $niceName,
'contact_person_id' = 
 $contactPersonId,--
 Trying to return an id here
'location_id' =  $locationId,-- Trying
 to
 return and here
'reseller_id' =  $resellerId,
'date_created' =  $now,
'short_description' =
 $values['shortDescription'],
'long_description' =
 $values['longDescription'],
'url' =  $values['advertiserURL'],
'logo_url' =  $values['logo'],
'date_created' =  $now
);

$dbAdvertiser = new Advertiser();
$dbAdvertiser-insert($advertiserData);
  }




 -
 Bob Hanson
 Web Developer
 SLC, UT
 
 
 

-- 
View this message in context: 
http://www.nabble.com/lastInsertId%28%29-tp22253546p22313403.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Any success getting breakpoints to work in NetBeans IDE 6.5 ?

2009-02-21 Thread swilhelm

Got it to work. 

Since I use a custom built version of PHP, I needed to use the custom phpize
and php-config when compiling xdebug.  

Snapshot of Netbeans debugging a ZF controller can be found 
http://flickr.com/photos/stevewilhelm/3299632622/ here .

http://www.nabble.com/file/p22143944/3299632622_3cd4710be0_m.jpg 


swilhelm wrote:
 
 I have been using the NetBeans IDE 6.5 with the PHP plugin with my current
 ZF-based project.
 
 I like many of the features, but I have not yet been able to get Debugging
 with xdebug, specifically setting breakpoints, to work. Anyone had
 success? 
 
 I am running NetBeans 6.5, Mac OS X 10.5.6,  PHP 5.2.6,  and Firefox
 3.0.6.
 
 - Steve W.
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Any-success-getting-breakpoints-to-work-in-NetBeans-IDE-6.5---tp22133108p22143944.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Any success getting breakpoints to work in NetBeans IDE 6.5 ?

2009-02-20 Thread swilhelm

I have been using the NetBeans IDE 6.5 with the PHP plugin with my current
ZF-based project.

I like many of the features, but I have not yet been able to get Debugging
with xdebug, specifically setting breakpoints, to work. Anyone had success? 

I am running NetBeans 6.5, Mac OS X 10.5.6,  PHP 5.2.6,  and Firefox 3.0.6.

- Steve W.




-- 
View this message in context: 
http://www.nabble.com/Any-success-getting-breakpoints-to-work-in-NetBeans-IDE-6.5---tp22133108p22133108.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Beginner tutorials not on Zend.com

2009-02-11 Thread swilhelm

I found the book Zend Framework in Action by Allen, Lo, and Brown very
helpful.

The source code examples from the book can be found on the publisher's site 
http://www.manning.com/allen/ here .

- Steve W.


Jason DeBord wrote:
 
 Can  you guys recommend the best and very basic Zend Framework tutorials.
 I've exhausted the Zend site.
 
 Thanks.
 
 And thanks for the replies to my previous emails. I really appreciate it.
 
 Jason DEBORD
 Limoges, France
 
 

-- 
View this message in context: 
http://www.nabble.com/Beginner-tutorials-not-on-Zend.com-tp21958831p21971179.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Continue Processing after an action is completed

2009-02-08 Thread swilhelm

Store the data needed for further processing in some persistent queue and use
a cron job to poll the further processing queue on regular intervals.

- Steve W.


Ashley McConnell wrote:
 
 Hi Folks,
 
 I would like to be able to call an action / respond to the client and then
 continue on with some further processing.
 
 I have tried a couple of things: -
 
 Using fork: -
 http://www.php.net/manual/en/function.pcntl-fork.php
 
 This doesn't work on my windows installation and i'm not sure it will be
 enabled on my hosting.
 
 Using a headers hack method:-
 
 http://www.brandonchecketts.com/archives/performing-post-output-script-processing-in-php
 
 This seems to work the first time, but not the next time you call it.
 
 Register Shutdown function
 http://uk2.php.net/register_shutdown_function
 
 This doesn't work at all - it just blocks until the other processing is
 finished.
 
 Is there anything that works with the Zend Framework? Any other ideas?
 
 Thanks for your help
 All the best,
 Ash
 
 

-- 
View this message in context: 
http://www.nabble.com/Continue-Processing-after-an-action-is-completed-tp21900147p21908043.html
Sent from the Zend Framework mailing list archive at Nabble.com.



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

2009-02-04 Thread swilhelm

Wil's post had an unfortunately line break.

Issues list can be found 
http://framework.zend.com/issues/secure/IssueNavigator.jspa?requestId=10944 
here   (login required).


wllm wrote:
 
 Hi all,
 
 It is my pleasure to announce the release of Zend Framework 1.7.4! 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/IssueNavigator.jspa?requestId=10
 944
 
 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
 
 

-- 
View this message in context: 
http://www.nabble.com/Zend-Framework-1.7.4-is-now-available%21-tp21797424p21835346.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Form Radio Buttons in ini file

2009-01-22 Thread swilhelm

Try adding the following

advertiser.campaignCreate.elements.campaignMessageAttempts.options.multiOptions.1
= 1
advertiser.campaignCreate.elements.campaignMessageAttempts.options.multiOptions.2
= 2
advertiser.campaignCreate.elements.campaignMessageAttempts.options.multiOptions.3
= 3

- Steve W.


Bob O wrote:
 
 Im trying to set a group of radio buttons inside an .ini file and then
 display it in the view script using 1 call..
 
 this is the html im trying to create with the ini
 input type=radio name=message_retry value=1 / 1
 input type=radio name=message_retry value=2 / 2
 input type=radio name=message_retry value=3 / 3
 
 this is the current .ini segment
 
 ; Message Attempts Radio
 advertiser.campaignCreate.elements.campaignMessageAttempts.t ype = radio
 advertiser.campaignCreate.elements.campaignMessageAttempts.o
 ptions.required = false
 advertiser.campaignCreate.elements.campaignMessageAttempts.o ptions.label
 = Message Attempts Retry
 advertiser.campaignCreate.elements.campaignMessageAttempts.o
 ptions.attribs.id = campaign_frequency
 advertiser.campaignCreate.elements.campaignMessageAttempts.o
 ptions.attribs.tabIndex = 27
 advertiser.campaignCreate.elements.campaignMessageAttempts.o
 ptions.attribs.alt = Set Retry Attempts
 advertiser.campaignCreate.elements.campaignMessageAttempts.o
 ptions.decorators.type = ViewHelper
 
 and then call it in the script like so
 
 ?php echo $this-campaignCreateForm-campaignMessageAttempts; ?
 
 
 im just not sure how to set the elements up in the ini file?
 

-- 
View this message in context: 
http://www.nabble.com/Zend_Form-Radio-Buttons-in-ini-file-tp21606880p21613975.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] zend form, sub forms and submit element

2009-01-14 Thread swilhelm

Coincidentally, I was testing subforms on Monday.  Here is a somewhat
contrived login form created from two subforms.

I took a slightly different approach in that I wanted the form and subforms
created by config files and I am using a form viewscript to render the form. 

Code fragments below. Hope this helps.

- Steve W.

// 
$config = new Zend_Config_Ini(APPLICATION_PATH .
'/config/forms.ini');
$this-_loginForm   = new Zend_Form($config-login-login);

$utilConfig = new Zend_Config_Ini(APPLICATION_PATH .
'/config/utilForms.ini');

$this-_loginForm-addSubForm(new
Zend_Form_SubForm($utilConfig-util-login), 'login'); 
$this-_loginForm-addSubForm(new
Zend_Form_SubForm($utilConfig-util-minimalInfo), 'minimalInfo');

$element = new Zend_Form_Element_Submit('submit');
$this-_loginForm-addElement($element, 'submit');

$this-_loginForm-setDecorators( 
array( 
array('ViewScript', array('viewScript'
= 'login/login.phtml'))
)
); 

Here are my config files. Notice I am playing setting decorators.type to
ViewHelper to test the control  element decoration.

// forms.ini

;; Login Controller
;; Login Form
login.form = login
login.login.action = identify
login.login.method = post
;
login.login.elements.hidden.type = hidden 
login.login.elements.hidden.options.value = testing


// utilForms.ini

;; login subform
util.login.subform = true
util.login.subform.name = _login

; username element
util.login.elements.username.type = text
util.login.elements.username.options.validators.alnum.validator = alnum
util.login.elements.username.options.validators.regex.validator = regex
util.login.elements.username.options.validators.regex.options.pattern =
/^[a-z]/i
util.login.elements.username.options.validators.strlen.validator =
StringLength
util.login.elements.username.options.validators.strlen.options.min = 6
util.login.elements.username.options.validators.strlen.options.max = 20
util.login.elements.username.options.required = true
util.login.elements.username.options.filters.lower.filter = StringToLower
util.login.elements.username.options.label = Username:
util.login.elements.username.options.decorators.type = ViewHelper

; password element
util.login.elements.password.type = password
util.login.elements.password.options.validators.strlen.validator =
StringLength
util.login.elements.password.options.validators.strlen.options.min = 6
util.login.elements.password.options.required = true
util.login.elements.password.options.label = Password:
util.login.elements.password.options.decorators.type = ViewHelper


;; minimualInfo subForm

util.minimalInfo.subform = true
util.minimalInfo.subform.name = _minimalInfo

; email element
util.minimalInfo.elements.email.type = text
util.minimalInfo.elements.email.options.validators.notempty.validator =
NotEmpty
util.minimalInfo.elements.email.options.validators.notempty.breakChainOnFailure
= true
util.minimalInfo.elements.email.options.validators.strlen.validator =
StringLength
util.minimalInfo.elements.email.options.validators.strlen.options.min = 1
util.minimalInfo.elements.email.options.validators.strlen.options.max = 50
util.minimalInfo.elements.email.options.required = true
util.minimalInfo.elements.email.options.label = EMail:

; phone element
util.minimalInfo.elements.phone.type = text
util.minimalInfo.elements.phone.options.validators.notempty.validator =
NotEmpty
util.minimalInfo.elements.phone.options.validators.notempty.breakChainOnFailure
= true
util.minimalInfo.elements.phone.options.validators.strlen.validator =
StringLength
util.minimalInfo.elements.phone.options.validators.strlen.options.min = 1
util.minimalInfo.elements.phone.options.validators.strlen.options.max = 15
util.minimalInfo.elements.phone.options.required = false
util.minimalInfo.elements.phone.options.label = Phone:

// Here is the ViewScript views/scripts/login/login.phtml

h1?php echo $this-escape($this-title); ?/h1
?php echo $this-actionMessages();?
pPlease log in here/p
form action=?php echo $this-escape($this-loginForm-getAction()); ?
  method=?php echo $this-escape($this-loginForm-getMethod());
?

div id=username class=formLabelUsername:/div?php echo
$this-loginForm-login-username; ?br/

Password:?php echo $this-loginForm-login-password; ?br/

?php echo $this-loginForm-minimalInfo-email; ?br/

?php echo $this-loginForm-minimalInfo-phone; ?br/

?echo $this-loginForm-submit ?
/form


qba_rox wrote:
 
 HI
 I have one main form, and two sub forms, and I want to have a common
 submit button. But it really doesnt display that button after render
 action. 
 
 got:
 
 $this-setDecorators(array(
   'FormElements', 
   array('TabContainer', array(
   'id'  = 'newsTabs',
   'style'   = 

[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 conjunction with his
Controller_Request_Cli class for exposing some of your Zend-based
application via command line or cron jobs. 

I was wondering if this is the recommended approach to exposing global
resources or is there a Zend Framework approved method?

- Steve W.
-- 
View this message in context: 
http://www.nabble.com/Is-Cal-Evan%27s-Globals.php-a-recommended-approach-tp21379960p21379960.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Best practice about a usage

2009-01-06 Thread swilhelm

For utility functions that are used by actions, you may want to create 
http://devzone.zend.com/article/3350-Action-Helpers-in-Zend-Framework Action
Helpers .

- Steve W.


Guillaume BABIK wrote:
 
 Hi,
 
  
 
 I've got a script which generate a group of directories from a name file
 
 Ex: 12345678.jpg = /1234/5678/
 
  
 
 This script can be called from many places in my ZF application
 
  
 
 I am looking for the best practice to implement this script in my ZF
 application.
 
  
 
 Lots of possibilities: 
 
 - Case I : In a Model file: But my script is not associated to a
 single model.
 
 - Case II : In a static method in a class like My_Function_Library
 (In order to be simply called by Zend_Loader)
 
 - Case III : In a simply PHP file which I includes in my Bootstrap
 
 - = Other ideas???
 
  
 
 Currently I put theses sort of scripts in statics methods in a class (Case
 II)
 
  
 
 But is this the Best Practice?
 
  
 
 Many thanks,
 
  
 
 Cheers,
 
  
 
 PS: HAPPY NEW YEAR
 
  
 
 Guillaume BABIK
 
 INTERNIM
 
 45, rue Aristide Briand
 
 92300 LEVALLOIS
 
 Tel : 01.40.87.11.20
 
 Fax : 01.47.57.38.87
 
 Mobile : 06.80.21.90.29
 
  BLOCKED::http://www.internim.com/ http://www.internim.com
 
  
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Best-practice-about-a-usage-tp21314867p21324169.html
Sent from the Zend Framework mailing list archive at Nabble.com.



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

2008-12-23 Thread swilhelm

Anyone using ClockingIT? Looks very similar in functionality to Trac and
Mantis. 

- Steve


Jake McGraw wrote:
 
 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
 robert.cast...@macro4.com wrote:
 Hi,

 Just curious here.  I/we currently use  Bugzilla  CVS, no formal wiki
 but I
 do have a MediaWiki used for somethings.

 I am looking for a solution that fits all, so the obvious choices are
 'Trac'
 like.

 My problem is that I need a solution that will support multiple projects.
 (Trac doesn't score well in this area.)

 Bugzilla is used by multiple PHP, Java  C/C++ products.  CVS is used
 only
 by PHP developers the 'others' use VSS.
 MediaWiki is used for 'sparse' documentation.


 My gripes with the current setup:

 Bugzilla - v. slow and ugly but it fitted the bill at the time.
 CVS - I like, no love, CVS but I know that there are better solutions out
 there but am concerned about migration etc.
 MediaWiki - Probably too much of an overkill for what we need and it is
 not
 that easy to configured, extend etc.

 I now that the ZF team uses JIRA, Confluence etc but I have a budget of
 £0/$0 :-) and don't qualify for the OS licenses.

 So ... I would be interested on the views of others of a 'one hat fits
 all'
 solution that can handle multiple projects.
 The solution needs to offer Issues/Bug tracking and Wiki at a minimum.
 Integration with SCM not important but
 if it does it great.

 I would prefer a PHP based solution but happy to consider others i.e.
 Ruby,
 Perl, Java etc.

 - Robert


 
 This email has been scanned for all known viruses by the MessageLabs
 Email
 Security Service and the Macro 4 plc internal virus protection system.
 

 
 

-- 
View this message in context: 
http://www.nabble.com/What-do-you-use-to-manage-your-ZF-projects--tp21118310p21151707.html
Sent from the Zend Framework mailing list archive at Nabble.com.