Re: [fw-general] Adding routes with application.ini

2009-05-01 Thread iceangel89


Matthew Weier O'Phinney-3 wrote:
> 
> At this point, I have no concrete idea of what your setup is.
> 
> The following *should* work:
> 
>  * Directory structure:
>   
>  application/
> Bootstrap.php
> configs/
> application.ini
> controllers/
> forms/
> models/
> modules/
> lab/
> Bootstrap.php
> configs/
> controllers/
> forms/
> models/
> views/
> views/
> 
> 

the only difference is mine setup has all default MVC folders in the default
folder inside the modules folder. but i changed that to be the same as yours
already. 

/application
   /modules
  /default
  /lab
  /...


Matthew Weier O'Phinney-3 wrote:
> 
>  * Configuration:
>resources.frontController.controllerDirectory = APPLICATION_PATH
> "/controllers"
>resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
>resources.modules[] = 
> 

hmm resources.modules[] = ???

i tried resources.modules[] = "lab" & resources.modules[] = "lab, library
..."

both does not work it says Uncaught exception 'Zend_Loader_Exception' with
message 'Options must be passed to resource loader constructor' in
D:\_FRAMEWORKS_\_ZF_TRUNK\library\Zend\Loader\Autoloader\Resource.php:75
Stack trace: #0
D:\_FRAMEWORKS_\_ZF_TRUNK\library\Zend\Application\Module\Autoloader.php(45):
Zend_Loader_Autoloader_Resource->__construct(Object(Bootstrap)) #1
D:\_FRAMEWORKS_\_ZF_TRUNK\library\Zend\Application\Resource\Modules.php(83):
Zend_Application_Module_Autoloader ...


Matthew Weier O'Phinney-3 wrote:
> 
>  * application/modules/lab/Bootstrap.php:
>class Lab_Bootstrap extends Zend_Application_Module_Bootstrap
>{
>}
> 
> Let me know if it does not.
> 

mine is same yes.

does not work if i put the resources.modules[] = ??? line i get the error as
above if i remove it i get Class 'Lab_Model_Department' not found in ...

so i must still have 

$resourceLoader = new Zend_Loader_Autoloader_Resource(array(
'basePath'  => APPLICATION_PATH . '/modules/lab',
'namespace' => 'Lab',
));
$resourceLoader->addResourceType('form', 'forms/', 'Form')
   ->addResourceType('model', 'models/', 'Model');

but i think using application.ini seems better
-- 
View this message in context: 
http://www.nabble.com/Adding-routes-with-application.ini-tp23293676p23342841.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] Zend_Application resource config issue

2009-05-01 Thread Tom Shaw
I actually got it to work the resource path specifies a distinct path for
the resources. I got it to work by taking out the full class name and using
the short name and making sure the class was in the namespace/folder
provided in the resourcePaths key/var.

Tom

-Original Message-
From: thurting [mailto:adweinst...@gmail.com] 
Sent: Friday, May 01, 2009 10:03 PM
To: fw-general@lists.zend.com
Subject: RE: [fw-general] Zend_Application resource config issue


1.  Are you sure?  I'm almost positive that the config variable
"resourcePaths" will not be processed.  It should be 'pluginpaths'.  Chances
are you example is just firing Zend_Application_Resource_View and not your
custom resource.

2.  Even if the example you listed works, you are still missing the major
point of my post, which relates to being able to use resources from
different namespaces even in the case where there is overlap.  This is due
to issues with the plugin loader.


Tom Shaw-4 wrote:
> 
> Actually that example does work I tried it less than an hour ago and got
> the
> below code to work. This method bypasses using the bootstrap class that
> extends Zend_Application_Bootstrap_Bootstrap. I think that method is just
> example of Zend_Application's flexibility not having to use a bootstrap
> class. I've been banging my on the wall the last two hours trying to learn
> how to refactor my existing application to utilize Zend_Applications
> functionality and have run into problems from the start. It would be nice
> if
> the developers also wrote some quick Zend_Tool demonstration applications
> which would save new users of Zend Framework not to mention existing users
> who have no experience with Zend_Application countless hours of learning a
> best practice way of incorporating the module. Plus it would give the
> developer a chance to show how they intended the module to be used in a
> best
> practice approach. Hopefully there will be some good tutorials coming
> soon.
> 
> Tom Shaw
> php.co...@tx.rr.com
> 
> $application = new Zend_Application(
> APPLICATION_ENV,
> array(
> 'resources' => array(
> 'view' => array('View'),  
> 'FrontController' => array(
> 'controllerDirectory' => APPLICATION_PATH .
> '/controllers',
> ),
> ),
> 'resourcePaths' => array(
> 'App_Bootstrap_Resource_View' => 'App/Bootstrap/Resource',
> )
> )
> );
> 
> -Original Message-
> From: thurting [mailto:adweinst...@gmail.com] 
> Sent: Friday, May 01, 2009 7:13 PM
> To: fw-general@lists.zend.com
> Subject: [fw-general] Zend_Application resource config issue
> 
> 
> Hi,
> 
> First, thanks for 1.8 - you guys rock!  Second, I took a dive in today and
> started playing around with Zend_Application and all the related goodies. 
> I've run into some issues with resources and wanted to run them by you:
> 
> 1.  In the docs
> (http://framework.zend.com/manual/en/zend.application.examples.html) it
> states that I could config a resource using the following:
> 
> $application = new Zend_Application(
> APPLICATION_ENV,
> array(
> 'resources' => array(
> 'My_Bootstrap_Resource_View' => array(), // full class name;
> OR
> 'view' => array(),   // short name
> 
> 'FrontController' => array(
> 'controllerDirectory' => APPLICATION_PATH .
> '/controllers',
> ),
> ),
> 
> // For short names, define resource paths:
> 'resourcePaths = array(
> 'My_Bootstrap_Resource' => 'My/Bootstrap/Resource',
> )
> )
> );
> 
> Unfortunately, this doesn't seem to work.  First the "resourcePaths"
> variable doesn't seem to do anything.  I think it should be "pluginPaths",
> so you may want to fix that.  In any case, the major issue I notice is
> with
> referencing a resource by full class name.  This simply does not work, and
> the plugin loader will throw an exception at line 392, as the matching
> plugin will not be found - the reason of course being that the plugin
> loader
> appends the path prefix to the class name on line 362.  So, the only
> solution is to use the shorthand notation (e.g. 'view'), but this can lead
> to problems.  Take the following example:
> 
> Let's say my application contains two libraries in addition to the core
> Zend
> library - let's call them Lib1 and Lib2.  Now, let's say both libraries
> define resources named Db and View.  I add both Lib1 and Lib2 to my plugin
> path (i.e. Lib1_Application_Resource => /library/Lib1/Application/Resource
> and Lib2_Application_Resource => /library/Lib1/Application/Resource), with
> Lib2 being added last and therefore checked first when the plugin loader
> runs.  Now, in my config I can't use full class name notation, so when I
> set
> up these resources I have to write something like:
> 
> resources.db =
> resources.view =
> 
> Here is the problem ... let's s

Re: [fw-general] Where should i put my Zend_Forms?

2009-05-01 Thread iceangel89


Matthew Weier O'Phinney-3 wrote:
> 
> If you're using Zend_Application now (and you are, right? :) ), the
> place to do it is in a forms/ subdirectory of your application and/or
> module:
> 
> application/
> forms/
> Login.php // Form_Login or Default_Form_Login
> modules/
> foo/
> forms/
> Login.php // Foo_Form_Login
> 

yup i am using Zend_Application. my directory structure is like: modular

application/
  /Bootstrap.php
  /config
 /application.ini
  /layouts
  /modules
/lab
  /models
  /views
  /controllers
  /forms
  /Bootstrap.php
/mod2 ...

and i used 

$resourceLoader = new Zend_Loader_Autoloader_Resource(array(
'basePath'  => APPLICATION_PATH . '/modules/lab',
'namespace' => 'Lab',
));
$resourceLoader->addResourceType('form', 'forms/', 'Form')
   ->addResourceType('model', 'models/', 'Model');

to autoload my forms and models already. :)
-- 
View this message in context: 
http://www.nabble.com/Where-should-i-put-my-Zend_Forms--tp23330183p23342716.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] Zend_Application resource config issue

2009-05-01 Thread thurting

1.  Are you sure?  I'm almost positive that the config variable
"resourcePaths" will not be processed.  It should be 'pluginpaths'.  Chances
are you example is just firing Zend_Application_Resource_View and not your
custom resource.

2.  Even if the example you listed works, you are still missing the major
point of my post, which relates to being able to use resources from
different namespaces even in the case where there is overlap.  This is due
to issues with the plugin loader.


Tom Shaw-4 wrote:
> 
> Actually that example does work I tried it less than an hour ago and got
> the
> below code to work. This method bypasses using the bootstrap class that
> extends Zend_Application_Bootstrap_Bootstrap. I think that method is just
> example of Zend_Application's flexibility not having to use a bootstrap
> class. I've been banging my on the wall the last two hours trying to learn
> how to refactor my existing application to utilize Zend_Applications
> functionality and have run into problems from the start. It would be nice
> if
> the developers also wrote some quick Zend_Tool demonstration applications
> which would save new users of Zend Framework not to mention existing users
> who have no experience with Zend_Application countless hours of learning a
> best practice way of incorporating the module. Plus it would give the
> developer a chance to show how they intended the module to be used in a
> best
> practice approach. Hopefully there will be some good tutorials coming
> soon.
> 
> Tom Shaw
> php.co...@tx.rr.com
> 
> $application = new Zend_Application(
> APPLICATION_ENV,
> array(
> 'resources' => array(
> 'view' => array('View'),  
> 'FrontController' => array(
> 'controllerDirectory' => APPLICATION_PATH .
> '/controllers',
> ),
> ),
> 'resourcePaths' => array(
> 'App_Bootstrap_Resource_View' => 'App/Bootstrap/Resource',
> )
> )
> );
> 
> -Original Message-
> From: thurting [mailto:adweinst...@gmail.com] 
> Sent: Friday, May 01, 2009 7:13 PM
> To: fw-general@lists.zend.com
> Subject: [fw-general] Zend_Application resource config issue
> 
> 
> Hi,
> 
> First, thanks for 1.8 - you guys rock!  Second, I took a dive in today and
> started playing around with Zend_Application and all the related goodies. 
> I've run into some issues with resources and wanted to run them by you:
> 
> 1.  In the docs
> (http://framework.zend.com/manual/en/zend.application.examples.html) it
> states that I could config a resource using the following:
> 
> $application = new Zend_Application(
> APPLICATION_ENV,
> array(
> 'resources' => array(
> 'My_Bootstrap_Resource_View' => array(), // full class name;
> OR
> 'view' => array(),   // short name
> 
> 'FrontController' => array(
> 'controllerDirectory' => APPLICATION_PATH .
> '/controllers',
> ),
> ),
> 
> // For short names, define resource paths:
> 'resourcePaths = array(
> 'My_Bootstrap_Resource' => 'My/Bootstrap/Resource',
> )
> )
> );
> 
> Unfortunately, this doesn't seem to work.  First the "resourcePaths"
> variable doesn't seem to do anything.  I think it should be "pluginPaths",
> so you may want to fix that.  In any case, the major issue I notice is
> with
> referencing a resource by full class name.  This simply does not work, and
> the plugin loader will throw an exception at line 392, as the matching
> plugin will not be found - the reason of course being that the plugin
> loader
> appends the path prefix to the class name on line 362.  So, the only
> solution is to use the shorthand notation (e.g. 'view'), but this can lead
> to problems.  Take the following example:
> 
> Let's say my application contains two libraries in addition to the core
> Zend
> library - let's call them Lib1 and Lib2.  Now, let's say both libraries
> define resources named Db and View.  I add both Lib1 and Lib2 to my plugin
> path (i.e. Lib1_Application_Resource => /library/Lib1/Application/Resource
> and Lib2_Application_Resource => /library/Lib1/Application/Resource), with
> Lib2 being added last and therefore checked first when the plugin loader
> runs.  Now, in my config I can't use full class name notation, so when I
> set
> up these resources I have to write something like:
> 
> resources.db =
> resources.view =
> 
> Here is the problem ... let's say I want to use the Lib1 Db resource and
> the
> Lib2 View resource ... how can I do this?  Since I'm locked into the
> shorthand notation, it seems that because Lib2 will be the first path
> checked by the plugin loader, I'm stuck having to use both the Lib2 Db and
> Lib2 View resources.  I guess I could create wrappers in the form of Lib3,
> but that seems like a pain and isn't really flexible if I want to be able
> to
> mix and match based on app environment or 

RE: [fw-general] Zend_Application resource config issue

2009-05-01 Thread Tom Shaw
Actually that example does work I tried it less than an hour ago and got the
below code to work. This method bypasses using the bootstrap class that
extends Zend_Application_Bootstrap_Bootstrap. I think that method is just
example of Zend_Application's flexibility not having to use a bootstrap
class. I've been banging my on the wall the last two hours trying to learn
how to refactor my existing application to utilize Zend_Applications
functionality and have run into problems from the start. It would be nice if
the developers also wrote some quick Zend_Tool demonstration applications
which would save new users of Zend Framework not to mention existing users
who have no experience with Zend_Application countless hours of learning a
best practice way of incorporating the module. Plus it would give the
developer a chance to show how they intended the module to be used in a best
practice approach. Hopefully there will be some good tutorials coming soon.

Tom Shaw
php.co...@tx.rr.com

$application = new Zend_Application(
APPLICATION_ENV,
array(
'resources' => array(
'view' => array('View'),  
'FrontController' => array(
'controllerDirectory' => APPLICATION_PATH . '/controllers',
),
),
'resourcePaths' => array(
'App_Bootstrap_Resource_View' => 'App/Bootstrap/Resource',
)
)
);

-Original Message-
From: thurting [mailto:adweinst...@gmail.com] 
Sent: Friday, May 01, 2009 7:13 PM
To: fw-general@lists.zend.com
Subject: [fw-general] Zend_Application resource config issue


Hi,

First, thanks for 1.8 - you guys rock!  Second, I took a dive in today and
started playing around with Zend_Application and all the related goodies. 
I've run into some issues with resources and wanted to run them by you:

1.  In the docs
(http://framework.zend.com/manual/en/zend.application.examples.html) it
states that I could config a resource using the following:

$application = new Zend_Application(
APPLICATION_ENV,
array(
'resources' => array(
'My_Bootstrap_Resource_View' => array(), // full class name; OR
'view' => array(),   // short name

'FrontController' => array(
'controllerDirectory' => APPLICATION_PATH . '/controllers',
),
),

// For short names, define resource paths:
'resourcePaths = array(
'My_Bootstrap_Resource' => 'My/Bootstrap/Resource',
)
)
);

Unfortunately, this doesn't seem to work.  First the "resourcePaths"
variable doesn't seem to do anything.  I think it should be "pluginPaths",
so you may want to fix that.  In any case, the major issue I notice is with
referencing a resource by full class name.  This simply does not work, and
the plugin loader will throw an exception at line 392, as the matching
plugin will not be found - the reason of course being that the plugin loader
appends the path prefix to the class name on line 362.  So, the only
solution is to use the shorthand notation (e.g. 'view'), but this can lead
to problems.  Take the following example:

Let's say my application contains two libraries in addition to the core Zend
library - let's call them Lib1 and Lib2.  Now, let's say both libraries
define resources named Db and View.  I add both Lib1 and Lib2 to my plugin
path (i.e. Lib1_Application_Resource => /library/Lib1/Application/Resource
and Lib2_Application_Resource => /library/Lib1/Application/Resource), with
Lib2 being added last and therefore checked first when the plugin loader
runs.  Now, in my config I can't use full class name notation, so when I set
up these resources I have to write something like:

resources.db =
resources.view =

Here is the problem ... let's say I want to use the Lib1 Db resource and the
Lib2 View resource ... how can I do this?  Since I'm locked into the
shorthand notation, it seems that because Lib2 will be the first path
checked by the plugin loader, I'm stuck having to use both the Lib2 Db and
Lib2 View resources.  I guess I could create wrappers in the form of Lib3,
but that seems like a pain and isn't really flexible if I want to be able to
mix and match based on app environment or other cases. In addition I could
create _init* methods in the bootstrap that explicitly instantiate resource
instances, but I would lose the ease of use of the Application config and
would have to make sure to properly set up the resource as is done in
pluginResource section of the _executeResource method in
Application/Bootstrap/BootstrapAbstract.php.

Sorry for the mouthful.  Any input?
-- 
View this message in context:
http://www.nabble.com/Zend_Application-resource-config-issue-tp23341727p2334
1727.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] How to add Translation using Zend_app resource

2009-05-01 Thread j.padron

I've found it:

resources.translate.data = APPLICATION_PATH"/lang"
resources.translate.adapter = "gettext"
resources.translate.locale = "es"
resources.translate.options.scan =  "directory"


j.padron wrote:
> 
> Hi,
> 
> I've got an application using Zend_app working fine, but now I'm adding
> Zend_Translate and find no way to configure it.
> 
> Application.ini has this settings: 
> 
> resources.translate.data =
> APPLICATION_PATH"/lang/es/LC_MESSAGES/translation.mo"
> resources.translate.adapter = "gettext"
> resources.translate.locale = "es"
> 
> How can I add other languages in ini file (addTranslation)?
> 
> Thank you
> 
> PS: (Documentation for Translate Resource is missing)
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-add-Translation-using-Zend_app-resource-tp23341465p23342437.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] ZF + Twitter?

2009-05-01 Thread José de Menezes Soares Neto
Is there something for using ZF + API Twitter?


[fw-general] Zend_Application resource config issue

2009-05-01 Thread thurting

Hi,

First, thanks for 1.8 - you guys rock!  Second, I took a dive in today and
started playing around with Zend_Application and all the related goodies. 
I've run into some issues with resources and wanted to run them by you:

1.  In the docs
(http://framework.zend.com/manual/en/zend.application.examples.html) it
states that I could config a resource using the following:

$application = new Zend_Application(
APPLICATION_ENV,
array(
'resources' => array(
'My_Bootstrap_Resource_View' => array(), // full class name; OR
'view' => array(),   // short name

'FrontController' => array(
'controllerDirectory' => APPLICATION_PATH . '/controllers',
),
),

// For short names, define resource paths:
'resourcePaths = array(
'My_Bootstrap_Resource' => 'My/Bootstrap/Resource',
)
)
);

Unfortunately, this doesn't seem to work.  First the "resourcePaths"
variable doesn't seem to do anything.  I think it should be "pluginPaths",
so you may want to fix that.  In any case, the major issue I notice is with
referencing a resource by full class name.  This simply does not work, and
the plugin loader will throw an exception at line 392, as the matching
plugin will not be found - the reason of course being that the plugin loader
appends the path prefix to the class name on line 362.  So, the only
solution is to use the shorthand notation (e.g. 'view'), but this can lead
to problems.  Take the following example:

Let's say my application contains two libraries in addition to the core Zend
library - let's call them Lib1 and Lib2.  Now, let's say both libraries
define resources named Db and View.  I add both Lib1 and Lib2 to my plugin
path (i.e. Lib1_Application_Resource => /library/Lib1/Application/Resource
and Lib2_Application_Resource => /library/Lib1/Application/Resource), with
Lib2 being added last and therefore checked first when the plugin loader
runs.  Now, in my config I can't use full class name notation, so when I set
up these resources I have to write something like:

resources.db =
resources.view =

Here is the problem ... let's say I want to use the Lib1 Db resource and the
Lib2 View resource ... how can I do this?  Since I'm locked into the
shorthand notation, it seems that because Lib2 will be the first path
checked by the plugin loader, I'm stuck having to use both the Lib2 Db and
Lib2 View resources.  I guess I could create wrappers in the form of Lib3,
but that seems like a pain and isn't really flexible if I want to be able to
mix and match based on app environment or other cases. In addition I could
create _init* methods in the bootstrap that explicitly instantiate resource
instances, but I would lose the ease of use of the Application config and
would have to make sure to properly set up the resource as is done in
pluginResource section of the _executeResource method in
Application/Bootstrap/BootstrapAbstract.php.

Sorry for the mouthful.  Any input?
-- 
View this message in context: 
http://www.nabble.com/Zend_Application-resource-config-issue-tp23341727p23341727.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Mistakes on Zend Quickstart

2009-05-01 Thread Wojciech Naruniec

Hi,

There are missing semicolons in "application/models/Guestbook.php"  
file on lines:


throw new Exception('Invalid guestbook property')

Btw, new quickstart is cool :-)

Greetings,
Wojciech Naruniec

http://wojciech.naruniec.info/



-- Andreas Kraftl  wrote
(on Friday, 01 May 2009, 07:23 PM +0200):

I don't know how to report the following two mistakes on Zend
quickstart:

http://framework.zend.com/docs/quickstart/create-a-model-and-database-table
4th code sample
all resource.db should be resources.db

another mistake
% php scripts/load.sqlite.php
should be
% php scripts/load.sqlite.php --withdata


Thanks for the report -- I'll take care of those today.

--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/




[fw-general] How to add Translation using Zend_app resource

2009-05-01 Thread j.padron

Hi,

I've got an application using Zend_app working fine, but now I'm adding
Zend_Translate and find no way to configure it.

Application.ini has this settings: 

resources.translate.data =
APPLICATION_PATH"/lang/es/LC_MESSAGES/translation.mo"
resources.translate.adapter = "gettext"
resources.translate.locale = "es"

How can I add other languages in ini file (addTranslation)?

Thank you

PS: (Documentation for Translate Resource is missing)



-- 
View this message in context: 
http://www.nabble.com/How-to-add-Translation-using-Zend_app-resource-tp23341465p23341465.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] ZF 1.8 and Performance Guide (using find/sed to remove require once calls)

2009-05-01 Thread Jamie Krasnoo
Sounds like you're using the new Autoloader. Read
http://devzone.zend.com/article/4525-Developing-a-Comprehensive-Autoloaderand
that will give you more insight as to how it works.

My guess is that you don't have
$autoloader->suppressNotFoundWarnings(false); and that's why you're getting
a blank page.

The command line listing at C.2.2.1. does have a missing ' in it. Worked
fine for me when I corrected it and ran it against the library.

Jamie

On Fri, May 1, 2009 at 2:33 PM, j5  wrote:

>
> Hey,
>
> I was tinkering with ZF 1.8 and the performance guide.
>
> Specifically:
>
> C.2.2.1. Strip require_once calls with find and sed.
>
> The sed/find commands here have changed I noticed.  When I run these new
> commands I get the following error:
>
> -bash: syntax error near unexpected token `('
>
>
> I took a look at the commands again and I thought I found a missing ' error
> so I tried the revised commands:
>
> find . -name '*.php' -not -wholename '*/Loader/Autoloader.php' -print0 | \
> xargs -0 sed --regexp-extended --in-place 's/(require_once)/\/\/ \1/g'
>
> (I added a ' after Autoloader.php).
>
> That looked like it worked. But now when I browse to my website, I get a
> blank page.
>
>
> I am not sure if what I did fixed anything or what..
>
> Anyone have any suggestions?
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/ZF-1.8-and-Performance-Guide-%28using-find-sed-to-remove-require-once-calls%29-tp23340034p23340034.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


[fw-general] ZF 1.8.0 setup question

2009-05-01 Thread Kendall Bennett
Hi Guys,

I am a total newb when it comes to ZF, and I want to start doing all our new 
development with the framework. Anyway, I was working through the Quick Start 
and also the Zend Framework In Action book, and it became clear to me that ZF 
allows for a nice separation between application 'modules' on the site. So for 
instance, we can write an app for http://www.mysite.com and the controllers etc 
all live under the application/ directory. What I am trying to work out, is the 
correct way to configure the front controller using the new Zend_Application 
and Zend_Bootstrap class so that I can have sub-sites within the site. Say, 
something like this:

http://www.mysite.com
mysite/application/...

http://www.mysite.com/admin
  mysite/modules/admin/...

http://www.mysite.com/blogs
  mysite/modules/blogs/...

The point of having the sub-sites is to keep a clear separation of code between 
the different sites, so for instance we can have an admin back end that is kept 
separate from the public front end, to make the code easier to maintain (shared 
classes can live in the common library directory).

I know it is possible to do it, but it is not clear how we are supposed to set 
things up with the front controller do to this. From the docs, I can see I need 
to find the instance of the front controller and call:

$front->addControllerDirectory('../modules/admin', 'admin');

But I am not sure where I should be doing that? Should I be adding an 
_initFrontController() function to the bootstrap class? If so I do that though, 
I need to write an entire init sequence and I am not sure how it should be 
written, because adding this function overrides the default init sequence for 
the front controller.

But perhaps there is a way to set this up in the application.ini file, to tell 
the front controller to set up the different modules that I want?

Also, if I did set this up, I would also need to register another directory 
with the module auto loader for other classes that would live in the sub-site 
directories. The default is to call this:

$autoloader = new Zend_Application_Module_Autoloader(array(  
'namespace' => 'Default',  'basePath'  => dirname(__FILE__),));
return $autoloader;
But I am not sure how I would restructure this call to add two name spaces? Ie: 
adding another namespace for say 'Admin' so it loads classes under the 
mysite/modules/admin/... Directory.

Regards,

Kendall Bennett, CEO
A Main Hobbies
424 Otterson Drive, Suite 160
Chico, CA 95928
1-800-705-2215 (Toll-Free)
1-530-894-0797 (Int'l & Local)
1-530-894-9049 (Fax)
http://www.amainhobbies.com


[fw-general] 1.8.0 documentation?

2009-05-01 Thread Mike Wright

Hi all,

Just pulled the full install of the new 1.8.0 release from the 
high-speed content distribution system and it doesn't contain the 
documentation for ZendFramework.  It does include docs for the extras 
but that's it.


There is neither api nor reference guide.

According to the Zend Community Downloads page:

The Zend Framework full package contains all unit tests, demos, 
documentation...


Seems something is amiss, no?

The reference guide is available as a PDF but, since I'm already running 
 servers and using a browser, having the html docs available in an 
adjacent browser tab is *much* preferred (and reduces the load on your 
servers :).


If somebody would be so kind as to post links to the doc trees it would 
be *most appreciated*.


Thank you,
Mike Wright


[fw-general] ZF 1.8 and Performance Guide (using find/sed to remove require once calls)

2009-05-01 Thread j5

Hey,

I was tinkering with ZF 1.8 and the performance guide.

Specifically:

C.2.2.1. Strip require_once calls with find and sed.

The sed/find commands here have changed I noticed.  When I run these new
commands I get the following error:

-bash: syntax error near unexpected token `('


I took a look at the commands again and I thought I found a missing ' error
so I tried the revised commands:

find . -name '*.php' -not -wholename '*/Loader/Autoloader.php' -print0 | \
xargs -0 sed --regexp-extended --in-place 's/(require_once)/\/\/ \1/g'

(I added a ' after Autoloader.php).

That looked like it worked. But now when I browse to my website, I get a
blank page.


I am not sure if what I did fixed anything or what..

Anyone have any suggestions?

Thanks
-- 
View this message in context: 
http://www.nabble.com/ZF-1.8-and-Performance-Guide-%28using-find-sed-to-remove-require-once-calls%29-tp23340034p23340034.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Re: Form tree element

2009-05-01 Thread Daniel Latter
sorry when I said: *which calls a recursive function*

I meant: which calls a recursive method of the Tree element class that
extends Zend_Form_Element

Thank You
Daniel Latter


2009/5/1 Daniel Latter 

> Hi all,
>
> I have created a form element that displays a tree structure of categories
> along with a checkbox a user can select as a html UL element, this requires
> a recursive function.
>
> The way I have implemented this is to extend Zend_Form_Element and then
> overrode the render method which calls a recursive function that eventually
> returns the tree as a UL list, with each LI being the category name and
> checkbox.
>
> I was wondering if this is the best way to create such an element?
>
> Any advice appreciated..
>
> Thank You
> Daniel Latter
>


[fw-general] Form tree element

2009-05-01 Thread Daniel Latter
Hi all,

I have created a form element that displays a tree structure of categories
along with a checkbox a user can select as a html UL element, this requires
a recursive function.

The way I have implemented this is to extend Zend_Form_Element and then
overrode the render method which calls a recursive function that eventually
returns the tree as a UL list, with each LI being the category name and
checkbox.

I was wondering if this is the best way to create such an element?

Any advice appreciated..

Thank You
Daniel Latter


Re: [fw-general] Mistakes on Zend Quickstart

2009-05-01 Thread Nick Howell
Hello,
Figured I'd add to this:
On http://framework.zend.com/docs/quickstart/create-your-project in the
conclusion section, the text abruptly ends with "You should". Pretty sure
the rest got chopped off.

Another (I think), which is not in the quickstart but in the manual, is
http://framework.zend.com/manual/en/zend.tool.framework.clitool.html#zend.tool.framework.clitool.setup-windows.
It says to copy "zf.sh and zf.php..."; isn't zf.bat, instead of zf.sh, the
one you need for Windows?

The new quickstart is very nice, thanks :)
---
Nick Howell


On Fri, May 1, 2009 at 3:33 PM, Matthew Weier O'Phinney wrote:

> -- Andreas Kraftl  wrote
> (on Friday, 01 May 2009, 07:23 PM +0200):
> > I don't know how to report the following two mistakes on Zend
> > quickstart:
> >
> >
> http://framework.zend.com/docs/quickstart/create-a-model-and-database-table
> > 4th code sample
> > all resource.db should be resources.db
> >
> > another mistake
> > % php scripts/load.sqlite.php
> > should be
> > % php scripts/load.sqlite.php --withdata
>
> Thanks for the report -- I'll take care of those today.
>
> --
> Matthew Weier O'Phinney
> Project Lead| matt...@zend.com
> Zend Framework  | http://framework.zend.com/
>


Re: [fw-general] zend autoloader problem

2009-05-01 Thread Matthew Weier O'Phinney
-- David Mintz  wrote
(on Friday, 01 May 2009, 03:29 PM -0400):
> On Fri, May 1, 2009 at 11:52 AM, mvug  wrote:
> I use the Zend framework for generating PDF's... I use the following code
> to
> initialize zend_pdf, but from version 1.8 the autoloader is not working...
> can anybody help me? This is the "old" code I use...
> 
>  
> // LOAD ZEND_PDF
> $path = '../system/plugins';
> set_include_path( get_include_path().PATH_SEPARATOR.$path );
> require_once $path.'/Zend/Loader.php';
> Zend_Loader::registerAutoload();
> 
> $pdf = Zend_Pdf::load('templatepdf.pdf');
> ?>
> --
> 
> Don't know if this is directly relevant to your problem, but when I ran 
> similar
> code in 1.8.0 I got deprecation warnings. Now I go like this in my bootstrap
> (rather, my index.php; migration to real bootstrapping is a WIP):
> 
> require_once('Zend/Loader/Autoloader.php');
> Zend_Loader_Autoloader::getInstance();
> 
> and that seems to be enough because "the first time an instance of the
> autoloader is retrieved, it registers itself with spl_autoload. You retrieve 
> an
> instance using the getInstance() method" according to 
> http://framework.zend.com
> /manual/en/zend.loader.autoloader.html#zend.loader.autoloader.usage.
> 
> There is surely a more correct way in 1.8.

Nope, that's the recommended way. You can also read about it here:

http://devzone.zend.com/a/4525

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


Re: [fw-general] Mistakes on Zend Quickstart

2009-05-01 Thread Matthew Weier O'Phinney
-- Andreas Kraftl  wrote
(on Friday, 01 May 2009, 07:23 PM +0200):
> I don't know how to report the following two mistakes on Zend
> quickstart:
> 
> http://framework.zend.com/docs/quickstart/create-a-model-and-database-table
> 4th code sample
> all resource.db should be resources.db
> 
> another mistake
> % php scripts/load.sqlite.php
> should be
> % php scripts/load.sqlite.php --withdata

Thanks for the report -- I'll take care of those today.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


Re: [fw-general] modules and Zend_Tool

2009-05-01 Thread Matthew Weier O'Phinney
-- David Mintz  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/


Re: [fw-general] Zend_Application config option to setup PluginLoader include file cache?

2009-05-01 Thread Matthew Weier O'Phinney
-- j5  wrote
(on Friday, 01 May 2009, 08:08 AM -0700):
> I was just wondering if there is a config option that goes in
> application.ini to initialize the PluginLoader include file cache?
> 
> I did not see anything about it in the manual.

There's not one currently built-in -- would be a great candidate for a
resource plugin. Care opening a feature request in the tracker?

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


Re: [fw-general] Adding routes with application.ini

2009-05-01 Thread Matthew Weier O'Phinney
-- iceangel89  wrote
(on Friday, 01 May 2009, 07:05 AM -0700):
> Matthew Weier O'Phinney-3 wrote:
> > 
> > Even easier -- drop a Bootstrap.php into modules/lab/ with the class
> > Lab_Bootstrap, and have that class extend
> > Zend_Application_Module_Bootstrap, and it will do it for you. :)
> > 
> > application/
> > modules/
> > lab/
> > Bootstrap.php
> > 
> > 
> > class Lab_Bootstrap extends Zend_Application_Module_Autoloader
> > {
> > }
> > 
> 
> will it? i tried that and it says 
> 
> Class 'Lab_Model_Department' not found in  ...

At this point, I have no concrete idea of what your setup is.

The following *should* work:

 * Directory structure:
  
 application/
Bootstrap.php
configs/
application.ini
controllers/
forms/
models/
modules/
lab/
Bootstrap.php
configs/
controllers/
forms/
models/
views/
views/

 * Configuration:
   resources.frontController.controllerDirectory = APPLICATION_PATH 
"/controllers"
   resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
   resources.modules[] = 

 * application/modules/lab/Bootstrap.php:
   class Lab_Bootstrap extends Zend_Application_Module_Bootstrap
   {
   }

Let me know if it does not.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


Re: [fw-general] zend autoloader problem

2009-05-01 Thread David Mintz
On Fri, May 1, 2009 at 11:52 AM, mvug  wrote:

>
> Hi guys,
>
> I use the Zend framework for generating PDF's... I use the following code
> to
> initialize zend_pdf, but from version 1.8 the autoloader is not working...
> can anybody help me? This is the "old" code I use...
>
> 
> // LOAD ZEND_PDF
> $path = '../system/plugins';
> set_include_path( get_include_path().PATH_SEPARATOR.$path );
> require_once $path.'/Zend/Loader.php';
> Zend_Loader::registerAutoload();
>
> $pdf = Zend_Pdf::load('templatepdf.pdf');
> ?>
> --



Don't know if this is directly relevant to your problem, but when I ran
similar code in 1.8.0 I got deprecation warnings. Now I go like this in my
bootstrap (rather, my index.php; migration to real bootstrapping is a WIP):

require_once('Zend/Loader/Autoloader.php');
Zend_Loader_Autoloader::getInstance();

and that seems to be enough because "the first time an instance of the
autoloader is retrieved, it registers itself with spl_autoload. You retrieve
an instance using the getInstance() method" according to
http://framework.zend.com/manual/en/zend.loader.autoloader.html#zend.loader.autoloader.usage
.

There is surely a more correct way in 1.8.



-- 
David Mintz
http://davidmintz.org/

The subtle source is clear and bright
The tributary streams flow through the darkness


[fw-general] Mistakes on Zend Quickstart

2009-05-01 Thread Andreas Kraftl
Hello,

I don't know how to report the following two mistakes on Zend
quickstart:

http://framework.zend.com/docs/quickstart/create-a-model-and-database-table
4th code sample
all resource.db should be resources.db

another mistake
% php scripts/load.sqlite.php
should be
% php scripts/load.sqlite.php --withdata

Thanks for this great quickstart
Andreas



[fw-general] modules and Zend_Tool

2009-05-01 Thread David Mintz
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?

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

-- 
David Mintz
http://davidmintz.org/

The subtle source is clear and bright
The tributary streams flow through the darkness


Re: [fw-general] Where should i put my Zend_Forms?

2009-05-01 Thread Joó Ádám
I use ini configuration for all forms, so they reside in
/config/forms/{controllername}.ini files, under their [{actionname}]
sections.


Regards,
Ádám


Re: [fw-general] Zend Framework 1.8.0 Released

2009-05-01 Thread Mills Guo
Great.


2009/5/1 joostvanveen 

>
> Congrats, all! Great work!
> --
> View this message in context:
> http://www.nabble.com/Zend-Framework-1.8.0-Released-tp23329644p23332748.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


[fw-general] zend autoloader problem

2009-05-01 Thread mvug

Hi guys,

I use the Zend framework for generating PDF's... I use the following code to
initialize zend_pdf, but from version 1.8 the autoloader is not working...
can anybody help me? This is the "old" code I use...


-- 
View this message in context: 
http://www.nabble.com/zend-autoloader-problem-tp23335295p23335295.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Application config option to setup PluginLoader include file cache?

2009-05-01 Thread j5

Hey,

I was just wondering if there is a config option that goes in
application.ini to initialize the PluginLoader include file cache?

I did not see anything about it in the manual.
-- 
View this message in context: 
http://www.nabble.com/Zend_Application-config-option-to-setup-PluginLoader-include-file-cache--tp23334632p23334632.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] ViewScript decorator fails for DisplayGroup

2009-05-01 Thread Kostyantyn Shakhov
I’m trying to use a ViewScript decorator for DisplayGroup of a
Zend_Form. The view script contains form elements wrapped in a table.

It displays the group with the legend but omit the table html markup.
How could I fix it?

In the Form:

$this->addDisplayGroup(
array([fields]),
'[group_name]',
array( 'legend' => '[name] ')
);

$group = $this->getDisplayGroup('[group_name]');

$group ->setDecorators(array(
array('FormElements', array('viewScript' => '[view script]')),
 'Fieldset'
 ));


Re: [fw-general] Adding routes with application.ini

2009-05-01 Thread iceangel89


Matthew Weier O'Phinney-3 wrote:
> 
> Even easier -- drop a Bootstrap.php into modules/lab/ with the class
> Lab_Bootstrap, and have that class extend
> Zend_Application_Module_Bootstrap, and it will do it for you. :)
> 
> application/
> modules/
> lab/
> Bootstrap.php
> 
> 
> class Lab_Bootstrap extends Zend_Application_Module_Autoloader
> {
> }
> 

will it? i tried that and it says 

Class 'Lab_Model_Department' not found in  ...

-- 
View this message in context: 
http://www.nabble.com/Adding-routes-with-application.ini-tp23293676p2610.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Adding routes with application.ini

2009-05-01 Thread Matthew Weier O'Phinney
-- iceangel89  wrote
(on Friday, 01 May 2009, 06:17 AM -0700):
> hmm then say i want to convert 
> 
> $resourceLoader = new Zend_Loader_Autoloader_Resource(array(
> 'basePath'  => APPLICATION_PATH . '/modules/lab',
> 'namespace' => 'Lab',
> ));
> $resourceLoader->addResourceType('form', 'forms/', 'Form')
>->addResourceType('model', 'models/', 'Model');
> 
> to put into application.ini?

Even easier -- drop a Bootstrap.php into modules/lab/ with the class
Lab_Bootstrap, and have that class extend
Zend_Application_Module_Bootstrap, and it will do it for you. :)

application/
modules/
lab/
Bootstrap.php


class Lab_Bootstrap extends Zend_Application_Module_Autoloader
{
}

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


Re: [fw-general] Can't seem to load module bootstraps in ZF 1.8

2009-05-01 Thread Matthew Weier O'Phinney
-- Tim Brayshaw  wrote
(on Friday, 01 May 2009, 01:52 PM +0100):
> On 1 May 2009, at 12:54, Matthew Weier O'Phinney wrote:
>
> > > In my application/modules/default/Bootstrap.php:
> > >
> > > class Default_Bootstrap extends Zend_Application_Module_Bootstrap
> > > {
> > >   public function run()
> > >   {
> > >   echo "Default Bootstrap!
> > > ";
> > >   }
> > > }
> >
> > run() in module bootstraps is never called; only the run() in the main
> > application bootstrap will ever be called. If you want to test that a
> > module bootstrap is indeed being instantiated and invoked, override  
> > the
> > constructor:
> >
> >   public function __construct($application)
> >   {
> >   parent::__construct($application);
> >   echo "Bootstrap loaded!";
> >   }
>
> I've found that this works, but not for the default module. Bootstraps  
> for other modules are loaded fine, it seems that the Bootstrap for the  
> default module isn't instantiated?
>
> I've partly got around this by manually setting the autoloader in my  
> main app bootstrap:
>
>public function _initAutoloaderForDefaultModule()
>{
>$this->bootstrap('frontController');
>$defaultModulePath = $this->frontController->getModuleDirectory(
>$this->frontController->getDefaultModule()
>);
>$autoloader = new Zend_Application_Module_Autoloader(array(
>'namespace' => 'Default',
>'basePath'  => $defaultModulePath
>));
>}

The code currently assumes that the application bootstrap is your
default module's bootstrap -- it does so so that the Modules resource
doesn't create a recursive dependency.

I'm looking at a solution to the situation, and hope to address it by
1.8.1.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


Re: [fw-general] Adding routes with application.ini

2009-05-01 Thread iceangel89

hmm then say i want to convert 

$resourceLoader = new Zend_Loader_Autoloader_Resource(array(
'basePath'  => APPLICATION_PATH . '/modules/lab',
'namespace' => 'Lab',
));
$resourceLoader->addResourceType('form', 'forms/', 'Form')
   ->addResourceType('model', 'models/', 'Model');

to put into application.ini?
-- 
View this message in context: 
http://www.nabble.com/Adding-routes-with-application.ini-tp23293676p23332965.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] PHP version requiment for individual classes?

2009-05-01 Thread mbneto
Hi Keith,

Till posted a long time ago a list of packages and their minimum required
version.

I'll investigate the Zend Server issue but will take some time to go through
all the process (evaluating, installing, changing support procedures etc).

On Fri, May 1, 2009 at 9:02 AM, keith Pope  wrote:

> What about installing Zend Server, its maintained by Zend so easy to
> install via yum etc.
>
> Not sure if there are any docs for version requirements for specific
> components, though I used ZF as a component lib on RHEL without
> problem.
>
> 2009/5/1 mbneto :
> > Hi,
> >
> > Now that the ZF .18 is out I'd like to know if anyone has the php version
> > requirement for the individual classes.  I know the general minimum php
> > version for the framework but in the past only a few of the classes
> actually
> > required 5.2.x.
> >
> > Since I am still stuck with 5.1.6 (RHEL) for a while this would allow me
> to
> > know if I can upgrade safely, as long as I do not use any class that uses
> > 5.2.x features.
> >
> > Thanks.
> >
>
>
>
> --
> --
> [MuTe]
> --
>


Re: [fw-general] PHP version requiment for individual classes?

2009-05-01 Thread keith Pope
What about installing Zend Server, its maintained by Zend so easy to
install via yum etc.

Not sure if there are any docs for version requirements for specific
components, though I used ZF as a component lib on RHEL without
problem.

2009/5/1 mbneto :
> Hi,
>
> Now that the ZF .18 is out I'd like to know if anyone has the php version
> requirement for the individual classes.  I know the general minimum php
> version for the framework but in the past only a few of the classes actually
> required 5.2.x.
>
> Since I am still stuck with 5.1.6 (RHEL) for a while this would allow me to
> know if I can upgrade safely, as long as I do not use any class that uses
> 5.2.x features.
>
> Thanks.
>



-- 
--
[MuTe]
--


Re: [fw-general] Zend Framework 1.8.0 Released

2009-05-01 Thread joostvanveen

Congrats, all! Great work!
-- 
View this message in context: 
http://www.nabble.com/Zend-Framework-1.8.0-Released-tp23329644p23332748.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] PHP version requiment for individual classes?

2009-05-01 Thread mbneto
Hi,

Now that the ZF .18 is out I'd like to know if anyone has the php version
requirement for the individual classes.  I know the general minimum php
version for the framework but in the past only a few of the classes actually
required 5.2.x.

Since I am still stuck with 5.1.6 (RHEL) for a while this would allow me to
know if I can upgrade safely, as long as I do not use any class that uses
5.2.x features.

Thanks.


Re: [fw-general] Can't seem to load module bootstraps in ZF 1.8

2009-05-01 Thread Tim Brayshaw

On 1 May 2009, at 12:54, Matthew Weier O'Phinney wrote:


In my application/modules/default/Bootstrap.php:

class Default_Bootstrap extends Zend_Application_Module_Bootstrap
{
  public function run()
  {
  echo "Default Bootstrap!
";
  }
}


run() in module bootstraps is never called; only the run() in the main
application bootstrap will ever be called. If you want to test that a
module bootstrap is indeed being instantiated and invoked, override  
the

constructor:

  public function __construct($application)
  {
  parent::__construct($application);
  echo "Bootstrap loaded!";
  }



Hi,

I've found that this works, but not for the default module. Bootstraps  
for other modules are loaded fine, it seems that the Bootstrap for the  
default module isn't instantiated?


I've partly got around this by manually setting the autoloader in my  
main app bootstrap:


   public function _initAutoloaderForDefaultModule()
   {
   $this->bootstrap('frontController');
   $defaultModulePath = $this->frontController->getModuleDirectory(
   $this->frontController->getDefaultModule()
   );
   $autoloader = new Zend_Application_Module_Autoloader(array(
   'namespace' => 'Default',
   'basePath'  => $defaultModulePath
   ));
   }

Cheers,

Tim.


Re: [fw-general] Where should i put my Zend_Forms?

2009-05-01 Thread Matthew Weier O'Phinney
-- iceangel89  wrote
(on Friday, 01 May 2009, 02:02 AM -0700):
> 
> where shld my Zend_Form classes go? do i put in something like
> library/MyApp/Forms or something like that? or in the modules/forms folder?
> if its in the modules/form folder i need to use require right? 

If you're using Zend_Application now (and you are, right? :) ), the
place to do it is in a forms/ subdirectory of your application and/or
module:

application/
forms/
Login.php // Form_Login or Default_Form_Login
modules/
foo/
forms/
Login.php // Foo_Form_Login


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


Re: [fw-general] Autoloading models

2009-05-01 Thread Matthew Weier O'Phinney
-- Dave kennedy  wrote
(on Friday, 01 May 2009, 03:40 AM -0700):
> Gabriel Malkas wrote:
> > Dave kennedy a écrit :
> > > Now I am tearing my hair out over this. I started refactoring a small
> > > project
> > > to 1.8. Before I had included my models directory in the include path so
> > > they could be called whenever wherever.
> > >
> > > My structure is
> > >
> > > application
> > >  - controllers
> > >  - models
> > >   - Sample.php
> > >  - forms
> > >  - configs
> > >  - layouts
> > >  - views
> > >  - Bootstrap.php
> > > public
> > >  - .htaccess
> > >  - index.php
> > >
> > > Im not using a modular structure and do not wish to. I read up on Zend
> > > Application and implemented it with the bootstrap I got a test project
> > > going, my problem is I can no longer autoload my model classes
> > >  
> > > before I would use $sample = new Sample();
> > >
> > > Now I can no longer get that working. I know it is to do with the
> > > namespace autoloading but just cannot get my head round it any
> > > help would be greatly appreciated.
> > 
> > I don't think it is the best solution to this problem, but it works : 
> > add a namespace to your models :) It makes sense. For example, if you 
> > have a model User or whatever, and your application is called App, then 
> > call your model App_User. Then, just add the namespace App to your 
> > configuration file.
> > 
> > I am not sure it is a good practice though. Maybe it is against Zend 
> > Framework philosophy, I don't know. It is up to you ;)
> 
> Thank you for the reply Gabriel. I had actually done this and I guess I must
> have too much rails in me I really do not like $user = new App_User(); As I
> feel it would not make my code as portable as I would like. Ideally I would
> like to keep $user = new User();
> 
> I think my answer lies in here somewhere 
> http://framework.zend.com/manual/en/zend.loader.autoloader-resource.html#zend.loader.autoloader-resource.usage
> http://framework.zend.com/manual/en/zend.loader.autoloader-resource.html#zend.loader.autoloader-resource.usage
>  
> 
> but not sure... ill maybe look at it after my head has cleared slightly :)

Using a project or vendor namespace is something we highly recommend,
and there are some pretty strong reasons for doing so.

  * Helps prevent naming collisions. One reason PHP is popular is
because of the number of unzip and go applications written for it. A
common pattern is to mix and match several applications to create a
site. However, if you need to integrate these apps, without proper
namespacing, you can create naming collisions.
  * Easier extension. If you want to re-use a model later in another
application, but need to modify some behavior, the best path is to
extend the original. It's easier to do so when the original and the
extending class simply vary the namespace: Blog_User vs Admin_User.
  * Heck, even php.net recommends the practice:
http://us3.php.net/manual/en/userlandnaming.tips.php

The resource autoloader is designed to do several things. First, it
expects a namespace prefix. Dirty little secret: you can provide an
empty string for this. Second, it expects that there are related
components (resources) under its base path, and each has a
component-level namespace prefix. The combination of a common prefix and
a component prefix helps ensure that the class names are unique, and
that their purpose within the project is clearly known from their name.

Yes, $user = new User() is nice and succinct, but it's non-portable and
tells you nothing about where it falls inside the project structure.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


Re: [fw-general] Adding routes with application.ini

2009-05-01 Thread Matthew Weier O'Phinney
-- iceangel89  wrote
(on Thursday, 30 April 2009, 08:56 PM -0700):
> Matthew Weier O'Phinney-3 wrote:
> > -- iceangel89  wrote
> > > and in general how do i create a mapping from 
> > > 
> > > resources.db.adapter = "pdo_mysql"
> > > resources.db.params.host = "localhost"
> > > resources.db.params.username = "root"
> > > resources.db.params.password = ""
> > > resources.db.params.dbname = "zf-ims"
> > > 
> > > to code like
> > > 
> > > new Zend_Db(...)?
> > > 
> > > is there documentation for this?
> > 
> > I'm not sure what you're gettting at. You cannot instantiate Zend_Db
> > directly, and the Db resource creates your adapter for you already.
> > 
> > You can retrieve that adapter in a couple of ways:
> > 
> >   * From Zend_Db_Table_Abstract:
> > $db = Zend_Db_Table_Abstract::getDefaultAdapter();
> > 
> >   * Within your action controller, you can pull it from the bootstrap,
> > which is available as an invocation arg:
> > $bootstrap = $this->getInvokeArg('bootstrap');
> > $db = $bootstrap->getResource('db');
> 
> i meant, like how do i know that resources.db will do something like $db =
> Zend_Db::factory(...)

Because that's how it's documented, and you can look at the source code
itself to see this. :)

> then resources.db.params. ... will set the 2nd args of the factory function?
> with this infomation i can easily convert what we can do in Bootstrap.php
> and put it in application.ini instead 

Yes, that's exactly how it works. The adapter parameter is used for the
first argument to the factory, and the params for the second argument.

> like now i didnt know that resources.router will refer to say the default
> router
>
> then resources.router.routes. will add a route etc?

Yes, of course it does. It pulls the router from the front controller,
and then passes the routes in the configuration to the router in order
to create them.

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


Re: [fw-general] Can't seem to load module boostraps in ZF 1.8

2009-05-01 Thread Matthew Weier O'Phinney
-- lroot  wrote
(on Thursday, 30 April 2009, 04:45 PM -0700):
> I seem to be having a tough time getting my Zend_Application_Module_Bootstrap
> based scripts to run. I'm using the following app structure:

 

> In my application/Bootstrap.php:
> 
> class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
> {
> public function run()
> {
> $this->bootstrap('frontController');
> $this->bootstrap('modules');
> $this->frontController->dispatch();
> }
> }
> 
> 
> In my application/modules/default/Bootstrap.php:
> 
> class Default_Bootstrap extends Zend_Application_Module_Bootstrap
> {
> public function run()
> {
> echo "Default Bootstrap!
> ";
> }
> }

run() in module bootstraps is never called; only the run() in the main
application bootstrap will ever be called. If you want to test that a
module bootstrap is indeed being instantiated and invoked, override the
constructor:

public function __construct($application)
{
parent::__construct($application);
echo "Bootstrap loaded!";
}


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


Re: [fw-general] Zend Framework 1.8.0 Released

2009-05-01 Thread Robert Castley

Brilliant, thank you!

http://jotbug.org now running it :-)

- Robert


On 30 Apr 2009, at 22:29, Matthew Weier O'Phinney wrote:


Greetings!

I'm pleased to announce the Zend Framework 1.8.0 release, the first  
in our

1.8 series of releases. This release marks the culmination of several
long-standing projects, as well as a formalization of many of our
recommended practices. You can get it here:

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

The number of community contributions and bug fixes for 1.8.0 has been
phenomenal -- we logged well over 200 bug/feature fixes for this minor
releaes alone!

Below is a list of the primary feature additions for the release.

 * Zend_Tool, contributed by Ralph Schindler
 * Zend_Application, contributed by Ben Scholzen and
   Matthew Weier O'Phinney
 * Zend_Loader_Autoloader and Zend_Loader_Autoloader_Resource,
   contributed by Matthew Weier O'Phinney
 * Zend_Navigation, contributed by Robin Skoglund
 * Zend_CodeGenerator, by Ralph Schindler
 * Zend_Reflection, Ralph Schindler and Matthew Weier O'Phinney
 * Zend Server backend for Zend_Cache, contributed by
   Alexander Veremyev
 * Zend_Service_Amazon_Ec2, contributed by Jon Whitcraft
 * Zend_Service_Amazon_S3, Justin Plock and Stas Malyshev
 * Incorporated Dojo 1.3
 * Added support for arbitrary Dojo Dijits via view helpers
 * Zend_Filter_Encrypt, contributed by Thomas Weidner
 * Zend_Filter_Decrypt, contributed by Thomas Weidner
 * Zend_Filter_LocalizedToNormalized and _NormalizedToLocalized,
   contributed by Thomas Weidner
 * Support for file upload progress support in Zend_File_Transfer,
   contributed by Thomas Weidner
 * Translation-aware routes, contributed by Ben Scholzen
 * Route chaining capabilities, contributed by Ben Scholzen
 * Zend_Json expression support, contributed by Benjamin Eberlei and
   Oscar Reales
 * Zend_Http_Client_Adapter_Curl, contributed by Benjamin Eberlei
 * SOAP input and output header support, contributed by
   Alexander Veremyev
 * Support for keyword field search using query strings, contributed  
by

   Alexander Veremyev
 * Support for searching across multiple indexes in  
Zend_Search_Lucene,

   contributed by Alexander Veremyev
 * Significant improvements for Zend_Search_Lucene search result match
   highlighting capabilities, contributed by Alexander Veremyev
 * Support for page scaling, shifting and skewing in Zend_Pdf,
   contributed by Alexander Veremyev
 * Zend_Tag_Cloud, contributed by Ben Scholzen
 * Locale support in Zend_Validate_Int and Zend_Validate_Float,
   contributed by Thomas Weidner
 * Phonecode support in Zend_Locale, contributed by Thomas Weidner
 * Zend_Validate_Db_RecordExists and _RecordNotExists, contributed by
   Ryan Mauger
 * Zend_Validate_Iban, contributed by Thomas Weidner
 * Zend_Validate_File_WordCount, contributed by Thomas Weidner

Please join me in a hearty round of congratualations and  
acknowledgement of

all contributors who helped make this release possible through code
contributions, feedback, testing, documentation, translations, and  
issue

reports!

--
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/



- Robert
robert.cast...@gmail.com





Re: [fw-general] Where should i put my Zend_Forms?

2009-05-01 Thread iceangel89

and how will u do the tight coupling between them?


Kieran Hall wrote:
> 
> I keep mine in a sub directory of my models directory, as I have a tight
> coupling between my forms and my models.  I'd say that you should put
> them wherever makes sense in the context of your application.
> 
> Kieran.
> 
> iceangel89 wrote:
>> where shld my Zend_Form classes go? do i put in something like
>> library/MyApp/Forms or something like that? or in the modules/forms
>> folder?
>> if its in the modules/form folder i need to use require right? 
> 
> -- 
> Kieran Hall
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Where-should-i-put-my-Zend_Forms--tp23330183p23331420.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] passing dojoType to the File element

2009-05-01 Thread antonis

Hello,

I am using a form to upload a file which works great (with dojo iframe) and
I would like to add dojoType to the file element, but I am unable to do so.

This is my code:

$this->addElement('File', 'file', 
array(
'dojoType'  => 'dojox.form.FileInput',
'validators'=> array(
'Size'  => array('min' => 20, 'max' => '1MB'),  

array('validator' => 'Extension', 'options' => 
'png,gif,jpg,jpeg'),
array('validator' => 'MaxUploadImage')  

),
'destination'   => $directory_name,
'required'  => true,
'decorators'=> $this->fileDecorators,
));

Is there an easy way of doing it without creating a custom Helper class?

Thanks,

Antonis
-- 
View this message in context: 
http://www.nabble.com/passing-dojoType-to-the-File-element-tp23331266p23331266.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Autoloading models

2009-05-01 Thread Dave kennedy



Gabriel Malkas wrote:
> 
> Dave kennedy a écrit :
>> Now I am tearing my hair out over this. I started refactoring a small
>> project
>> to 1.8. Before I had included my models directory in the include path so
>> they could be called whenever wherever.
>>
>> My structure is
>>
>> application
>>  - controllers
>>  - models
>>   - Sample.php
>>  - forms
>>  - configs
>>  - layouts
>>  - views
>>  - Bootstrap.php
>> public
>>  - .htaccess
>>  - index.php
>>
>> Im not using a modular structure and do not wish to. I read up on Zend
>> Application and implemented it with the bootstrap I got a test project
>> going, my problem is I can no longer autoload my model classes
>>  
>> before I would use $sample = new Sample();
>>
>> Now I can no longer get that working. I know it is to do with the
>> namespace
>> autoloading but just cannot get my head round it any help would be
>> greatly appreciated.
>>
>> Dave
>>
>>
>>   
> Dave,
> 
> I don't think it is the best solution to this problem, but it works : 
> add a namespace to your models :) It makes sense. For example, if you 
> have a model User or whatever, and your application is called App, then 
> call your model App_User. Then, just add the namespace App to your 
> configuration file.
> 
> I am not sure it is a good practice though. Maybe it is against Zend 
> Framework philosophy, I don't know. It is up to you ;)
> Regards,
> Gabriel Malkas, from France.
> 
> 
> 

Thank you for the reply Gabriel. I had actually done this and I guess I must
have too much rails in me I really do not like $user = new App_User(); As I
feel it would not make my code as portable as I would like. Ideally I would
like to keep $user = new User();

I think my answer lies in here somewhere 
http://framework.zend.com/manual/en/zend.loader.autoloader-resource.html#zend.loader.autoloader-resource.usage
http://framework.zend.com/manual/en/zend.loader.autoloader-resource.html#zend.loader.autoloader-resource.usage
 

but not sure... ill maybe look at it after my head has cleared slightly :)

Thanks again for the reply.

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



Re: [fw-general] Autoloading models

2009-05-01 Thread Tim Fountain
On 01/05/2009, Gabriel Malkas  wrote:
>
> Dave kennedy a écrit :
>
>
Now I can no longer get that working. I know it is to do with the namespace
>> autoloading but just cannot get my head round it any help would be
>> greatly appreciated.
>>
>
>
> I don't think it is the best solution to this problem, but it works : add a
> namespace to your models :)


I'm sure Matthew will be along with the proper solution shortly, but from
what I've seen of the new Autoloader you can set it to be the autoloader for
any namespace using $autoloader->setFallbackAutoloader(true), see:
http://framework.zend.com/manual/en/zend.loader.autoloader.html. This would
probably achieve what you're after.

-- 
Tim Fountain
http://tfountain.co.uk/


Re: [fw-general] Autoloading models

2009-05-01 Thread Gabriel Malkas

Dave kennedy a écrit :

Now I am tearing my hair out over this. I started refactoring a small project
to 1.8. Before I had included my models directory in the include path so
they could be called whenever wherever.

My structure is

application
 - controllers
 - models
  - Sample.php
 - forms
 - configs
 - layouts
 - views
 - Bootstrap.php
public
 - .htaccess
 - index.php

Im not using a modular structure and do not wish to. I read up on Zend
Application and implemented it with the bootstrap I got a test project
going, my problem is I can no longer autoload my model classes
 
before I would use $sample = new Sample();


Now I can no longer get that working. I know it is to do with the namespace
autoloading but just cannot get my head round it any help would be
greatly appreciated.

Dave


  

Dave,

I don't think it is the best solution to this problem, but it works : 
add a namespace to your models :) It makes sense. For example, if you 
have a model User or whatever, and your application is called App, then 
call your model App_User. Then, just add the namespace App to your 
configuration file.


I am not sure it is a good practice though. Maybe it is against Zend 
Framework philosophy, I don't know. It is up to you ;)

Regards,
Gabriel Malkas, from France.



[fw-general] Autoloading models

2009-05-01 Thread Dave kennedy

Now I am tearing my hair out over this. I started refactoring a small project
to 1.8. Before I had included my models directory in the include path so
they could be called whenever wherever.

My structure is

application
 - controllers
 - models
  - Sample.php
 - forms
 - configs
 - layouts
 - views
 - Bootstrap.php
public
 - .htaccess
 - index.php

Im not using a modular structure and do not wish to. I read up on Zend
Application and implemented it with the bootstrap I got a test project
going, my problem is I can no longer autoload my model classes
 
before I would use $sample = new Sample();

Now I can no longer get that working. I know it is to do with the namespace
autoloading but just cannot get my head round it any help would be
greatly appreciated.

Dave


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



Re: [fw-general] Where should i put my Zend_Forms?

2009-05-01 Thread Kieran Hall
I keep mine in a sub directory of my models directory, as I have a tight
coupling between my forms and my models.  I'd say that you should put
them wherever makes sense in the context of your application.

Kieran.

iceangel89 wrote:
> where shld my Zend_Form classes go? do i put in something like
> library/MyApp/Forms or something like that? or in the modules/forms folder?
> if its in the modules/form folder i need to use require right? 

-- 
Kieran Hall


Re: [fw-general] Getting the timezone from the browser's offset

2009-05-01 Thread Thomas Weidner

Peter,

according to the W3C headers there are 2 ways:

* Get the date header from the browser. Use it as input for Zend_Date using 
the W3C constant.

But you should note that this header can be supressed.

* Get the locale of the user and use 
Zend_Locale::getTranslation/getTranslationList() to get a relation between 
the full locale and the timezone. Note that the user can supress the locale 
and that it is also possible that he uses only a language (f.e. en) which 
would not allow to detect a language (en is supported in about 15 timezones)


* Then use again Zend_Date to get the offset between your timezone and the 
detected timezone.


Again:
As the user can supress EVERY of the mentioned headers there is no 100% 
perfect way of automatically detecting a users timezone.


Btw: Just to note and related to your code... 
Zend_Locale::getTranslationList() returns you a localized list of 
timezones... a german user would for example like to see "Mitteleuropäische 
Sommerzeit" instead of "Central European Time".


Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: "Peter Wansch" 

To: 
Sent: Friday, May 01, 2009 7:08 AM
Subject: Re: [fw-general] Getting the timezone from the browser's offset




Hi Thomas,
I was looking at the API doc for Zend_Date or Zend_Locale to find 
something

that would return for instance America/Los_Angeles. Any pointer is much
appreciated.
Danke!!
Peter

thomasW wrote:


You can use Zend_Date or Zend_Locale for this purpose.
But it is also not problematic to realize this manually.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: "Peter Wansch" 

To: 
Sent: Thursday, April 30, 2009 5:18 PM
Subject: [fw-general] Getting the timezone from the browser's offset




Hi,
In our application, we let users select Timezones. To render a timezone
list
we use the following view helper which works great:

class Ggv_View_Helper_TimezonesList extends Zend_View_Helper_Abstract
{
   public function timezonesList($selectedzone, $label, $name =
'timezone',
$desc = '')
   {
   //$output = ''.$label.':';
   $output = '';
   $output .= $this->timezonechoice($selectedzone);
   $output .= '';
   $output .= ' '.$desc.' ';
   return $output;
   }

   protected function timezonechoice($selectedzone)
   {
   $all = timezone_identifiers_list();

   $i = 0;
   foreach($all as $zone)
   {
   $zone = explode('/', $zone);
   $zones[$i]['continent'] = isset($zone[0]) ? $zone[0] : '';
   $zones[$i]['city'] = isset($zone[1]) ? $zone[1] : '';
   $zones[$i]['subcity'] = isset($zone[2]) ? $zone[2] : '';
   $i++;
   }

   asort($zones);
   $structure = '';
   foreach($zones as $zone)
   {
   extract($zone);
   if($continent == 'Africa' || $continent == 'America' ||
$continent == 'Antarctica' || $continent == 'Arctic' || $continent ==
'Asia'
|| $continent == 'Atlantic' || $continent == 'Australia' || $continent 
==

'Europe' || $continent == 'Indian' || $continent == 'Pacific')
   {
   if(!isset($selectcontinent))
   {
   $structure .= '';

// continent
   }
   elseif($selectcontinent != $continent)
   {
   $structure .= ''; // continent
   }

   if(isset($city) != '')
   {
   if (!empty($subcity) != '')
   {
   $city = $city . '/' . $subcity;
   }
   $structure .= "" . str_replace('_', ' ', $city) . ""; //
timezone
   }
   else
   {
   if (!empty($subcity) != '')
   {
   $city = $city . '/'. $subcity;
   }
   $structure .= "" . $continent . ""; // timezone
   }

   $selectcontinent = $continent;
   }
   }
   $structure .= '';
   return $structure;
   }
}


In the phtml view script we use the following which also works nicely:

translate('Community
Time Zone:') ?>


In our controller, we set the user_join_communityTimezZone to:

date_default_timezone_get());

so the default is the system timezone.

Is there an (easy way) without figuring out myself from the offset 
header

to
detect the most likely user timezone to avoid user error?
--
View this message in context:
http://www.nabble.com/Getting-the-timezone-from-the-browser%27s-offset-tp23269606p23269606.html
Sent from the Zend Framework mailing list archive at Nabble.com.






--
View this message in context: 
http://www.nabble.com/Getting-the-timezone-from-the-browser%27s-offset-tp23269606p23328538.html
Sent from the Zend Framework mailing list archive at Nabble.com. 




[fw-general] Where should i put my Zend_Forms?

2009-05-01 Thread iceangel89

where shld my Zend_Form classes go? do i put in something like
library/MyApp/Forms or something like that? or in the modules/forms folder?
if its in the modules/form folder i need to use require right? 
-- 
View this message in context: 
http://www.nabble.com/Where-should-i-put-my-Zend_Forms--tp23330183p23330183.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend Framework 1.8.0 Released

2009-05-01 Thread Matthew Weier O'Phinney
Greetings!

I'm pleased to announce the Zend Framework 1.8.0 release, the first in our
1.8 series of releases. This release marks the culmination of several
long-standing projects, as well as a formalization of many of our
recommended practices. You can get it here:

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

The number of community contributions and bug fixes for 1.8.0 has been
phenomenal -- we logged well over 200 bug/feature fixes for this minor
releaes alone! 

Below is a list of the primary feature additions for the release.

  * Zend_Tool, contributed by Ralph Schindler
  * Zend_Application, contributed by Ben Scholzen and 
Matthew Weier O'Phinney
  * Zend_Loader_Autoloader and Zend_Loader_Autoloader_Resource,
contributed by Matthew Weier O'Phinney
  * Zend_Navigation, contributed by Robin Skoglund
  * Zend_CodeGenerator, by Ralph Schindler
  * Zend_Reflection, Ralph Schindler and Matthew Weier O'Phinney
  * Zend Server backend for Zend_Cache, contributed by 
Alexander Veremyev
  * Zend_Service_Amazon_Ec2, contributed by Jon Whitcraft
  * Zend_Service_Amazon_S3, Justin Plock and Stas Malyshev
  * Incorporated Dojo 1.3
  * Added support for arbitrary Dojo Dijits via view helpers
  * Zend_Filter_Encrypt, contributed by Thomas Weidner
  * Zend_Filter_Decrypt, contributed by Thomas Weidner
  * Zend_Filter_LocalizedToNormalized and _NormalizedToLocalized,
contributed by Thomas Weidner 
  * Support for file upload progress support in Zend_File_Transfer, 
contributed by Thomas Weidner
  * Translation-aware routes, contributed by Ben Scholzen
  * Route chaining capabilities, contributed by Ben Scholzen
  * Zend_Json expression support, contributed by Benjamin Eberlei and
Oscar Reales
  * Zend_Http_Client_Adapter_Curl, contributed by Benjamin Eberlei
  * SOAP input and output header support, contributed by 
Alexander Veremyev
  * Support for keyword field search using query strings, contributed by
Alexander Veremyev
  * Support for searching across multiple indexes in Zend_Search_Lucene,
contributed by Alexander Veremyev
  * Significant improvements for Zend_Search_Lucene search result match
highlighting capabilities, contributed by Alexander Veremyev
  * Support for page scaling, shifting and skewing in Zend_Pdf,
contributed by Alexander Veremyev
  * Zend_Tag_Cloud, contributed by Ben Scholzen
  * Locale support in Zend_Validate_Int and Zend_Validate_Float,
contributed by Thomas Weidner
  * Phonecode support in Zend_Locale, contributed by Thomas Weidner
  * Zend_Validate_Db_RecordExists and _RecordNotExists, contributed by
Ryan Mauger
  * Zend_Validate_Iban, contributed by Thomas Weidner
  * Zend_Validate_File_WordCount, contributed by Thomas Weidner

Please join me in a hearty round of congratualations and acknowledgement of
all contributors who helped make this release possible through code
contributions, feedback, testing, documentation, translations, and issue
reports!

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


[fw-general] Zend Framework 1.8.0 Released

2009-05-01 Thread Matthew Weier O'Phinney
Greetings!

I'm pleased to announce the Zend Framework 1.8.0 release, the first in our
1.8 series of releases. This release marks the culmination of several
long-standing projects, as well as a formalization of many of our
recommended practices. You can get it here:

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

The number of community contributions and bug fixes for 1.8.0 has been
phenomenal -- we logged well over 200 bug/feature fixes for this minor
releaes alone! 

Below is a list of the primary feature additions for the release.

  * Zend_Tool, contributed by Ralph Schindler
  * Zend_Application, contributed by Ben Scholzen and 
Matthew Weier O'Phinney
  * Zend_Loader_Autoloader and Zend_Loader_Autoloader_Resource,
contributed by Matthew Weier O'Phinney
  * Zend_Navigation, contributed by Robin Skoglund
  * Zend_CodeGenerator, by Ralph Schindler
  * Zend_Reflection, Ralph Schindler and Matthew Weier O'Phinney
  * Zend Server backend for Zend_Cache, contributed by 
Alexander Veremyev
  * Zend_Service_Amazon_Ec2, contributed by Jon Whitcraft
  * Zend_Service_Amazon_S3, Justin Plock and Stas Malyshev
  * Incorporated Dojo 1.3
  * Added support for arbitrary Dojo Dijits via view helpers
  * Zend_Filter_Encrypt, contributed by Thomas Weidner
  * Zend_Filter_Decrypt, contributed by Thomas Weidner
  * Zend_Filter_LocalizedToNormalized and _NormalizedToLocalized,
contributed by Thomas Weidner 
  * Support for file upload progress support in Zend_File_Transfer, 
contributed by Thomas Weidner
  * Translation-aware routes, contributed by Ben Scholzen
  * Route chaining capabilities, contributed by Ben Scholzen
  * Zend_Json expression support, contributed by Benjamin Eberlei and
Oscar Reales
  * Zend_Http_Client_Adapter_Curl, contributed by Benjamin Eberlei
  * SOAP input and output header support, contributed by 
Alexander Veremyev
  * Support for keyword field search using query strings, contributed by
Alexander Veremyev
  * Support for searching across multiple indexes in Zend_Search_Lucene,
contributed by Alexander Veremyev
  * Significant improvements for Zend_Search_Lucene search result match
highlighting capabilities, contributed by Alexander Veremyev
  * Support for page scaling, shifting and skewing in Zend_Pdf,
contributed by Alexander Veremyev
  * Zend_Tag_Cloud, contributed by Ben Scholzen
  * Locale support in Zend_Validate_Int and Zend_Validate_Float,
contributed by Thomas Weidner
  * Phonecode support in Zend_Locale, contributed by Thomas Weidner
  * Zend_Validate_Db_RecordExists and _RecordNotExists, contributed by
Ryan Mauger
  * Zend_Validate_Iban, contributed by Thomas Weidner
  * Zend_Validate_File_WordCount, contributed by Thomas Weidner

Please join me in a hearty round of congratualations and acknowledgement of
all contributors who helped make this release possible through code
contributions, feedback, testing, documentation, translations, and issue
reports!

-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


Re: [fw-general] doing xajax like operation in zend framework

2009-05-01 Thread Matthew Weier O'Phinney
-- chronoel22  wrote
(on Thursday, 30 April 2009, 08:35 AM -0700):
> hi i was wondering if the zend framework provides a built-in way of
> manipulating html from the controller/action using ajax and javascript. i'm
> referring to how xajax and sajax does this. you see they implement something
> like the following on the php script:
> 
> $x = new xajax();
> $x->setStyle('aClass', 'display:none');
> 
> to manipulate the html and set the style of elements with class aClass to
> 'display:none'

No, nothing like this in ZF. That sort of thing is the job of a good
JavaScript framework.

> some content
> 
> now, moving on the mvc approach. i was thinking of a similar way to handle
> an ajax request to '/ajax/save/'. the said action will save some data passed
> by the ajax request and return a notification on the success of the
> operation. it will do so by creating a new div on the html an displaying the
> message in it. following is an imaginary code of the said idea.


You should look into Zend_Json_Server, which is a JSON-RPC server
implementation. It provides precisely this sort of functionality, and
does so by following an established standard.


> class AjaxControler extends Zend_Controller_Action {
>public function saveAction() {
>   $data = getParam('data');
>   // save $data probably to database
> 
>   $x = new xajax();
>   $x->addDiv('Data successfully saved', 'position:centered');
>}
> }
> 
> now, as you see. i'm not defining any view scripts. and i hope your getting
> my point. any nice ideas about this. am i doing this right?


-- 
Matthew Weier O'Phinney
Project Lead| matt...@zend.com
Zend Framework  | http://framework.zend.com/


[fw-general] Re[fw-general] freshing or reloading a menu that was loaded using the action stack

2009-05-01 Thread mapes911

Hi all,

I've created a site that has a menu that is pushed onto the action stack in
a class extending Zend_Controller_Plugin_Abstract.

$menuAction = clone($request);
$menuAction->setActionName('menu')
->setControllerName('home');
$actionStack->pushStack($menuAction);

and then rendered in my main layout file

layout()->menu; ?>

This seems to work great and the menu is loaded with every page that uses my
main layout.
But, I'd like to be able to "refresh" or reload this menu on certain
occasions without reloading my page, is there a way for me to do this?  I've
done a similar thing with many parts of my pages but not with actions that
are pushed onto this stack, so I'm not sure where to start.

Any ideas?
Thanks in advance
-- 
View this message in context: 
http://www.nabble.com/Refreshing-or-reloading-a-menu-that-was-loaded-using-the-action-stack-tp23329137p23329137.html
Sent from the Zend Framework mailing list archive at Nabble.com.