A good way is to create a model that has a method that does the validation.
In the controller you could handle the request this way:
public function saveAction()
{
if (!$this->getRequest()->isPost()) {
return $this->_helper->redirector('index');
}
if (false === ($model()->sav
Wil Moore III wrote:
>
> $user = new \my\model\User()
>
This also assumes that your namespaced classes are located in a directory
structure that matches the namespace.
So, the above example would indicate a directory structure like:
/path/to/your/library/my/model/User.php
And of course, "/pa
this is the way I'm using
if($this->getRequest()->isPost() && $form->isValid($_POST)){
but I saw most are use 2 IFs to do it
if($this->getRequest()->isPost()){
if ($form->isValid($_POST)){
is using the first way has draw backs ?
--
View this message in context:
http://zend-framework-com
jiewmeng wrote:
>
> but what if i want to load my own namespaced classes Doctrine
> Entities/Models & Proxies. in a specific directory? where shld my Doctrine
> Models and Proxies go btw? i put them in APPLICATION_PATH
> now
>
I put them under my namespace. For example if your namespace is "my"
after adding resource.db I add the following lines to config.ini
resources.session.use_only_cookies = true
resources.session.remember_me_seconds = 86400
resources.session.saveHandler.class = "Zend_Session_SaveHandler_DbTable"
resources.session.saveHandler.options.name = "session"
resources.se
Thanks for your reply.
Adding:
$this->bootstrap('Acl');
at the very beginning of my function _initViewSettings() doesn't solve the
problem.
any other idea's?
On Sun, Jul 25, 2010 at 1:37 PM, Aleksey Zapparov wrote:
> Hello,
>
> Because according to your Bootstrapper you have seems liek Acl reso
Hello,
Because according to your Bootstrapper you have seems liek Acl resource
is loaded later. Put $this->bootstrap('Acl'); prior accessing $this->_acl within
$view->navigation($navContainer)...
2010/7/25 Jigal sanders :
> Hello Everyone,
> When i tried to upgrade my ubuntu system it didn't go
Hello Everyone,
When i tried to upgrade my ubuntu system it didn't go as I wanted. Now I had
to reinstall everyting.
I am already busy to get my ZF project working again but unsucsesfull. Every
time when i try to save something to the database or read data from the db
it goes wong.
I don't see a c