Hi All,
Just a quick question regarding zend helper classes. Are these more efficient
than using standard php object static methods
For example in a view script to get the baseUrl.
The helper version might look like:
$this-baseUrl();
The object static function might look like:
App::baseUrl();
Steven
If you mean faster, no they are not. But it's irrelevant, the difference is
next to nothing, definitely not worth breaking OO design. If you're looking
for optimisations start with
http://framework.zend.com/manual/en/performance.html
Cheers
O'BRIEN, Steven X wrote:
Hi All,
Just a
Bug in my code or bug in Zend Framework?
bytte wrote:
I'm now using setMaxFileSize().
Here's the (reduced for readability) code in my controller to retrieve and
validate the form input. I have two forms on the same page so that's why I
do the array_key_exists thing to check which form
Hi all,
I'm pretty sure that others have done the same as me:
Base Controllers like My_BaseController and used as follows:
Module_SomeController extends MyLibrary_Controller_Base
Well, if so, you probably have done some methods just to shorten things a
bit.
I'll share some of my convienience
Don't forget also to add the unit tests. ;-)
This simplifies the things for us reviewers and fastens the integration of
this fix into the core.
And of course don't forget to ask the person who is actually assigned to
this bug... he may already be working on it. ;-)
Greetings
Thomas Weidner,
How should the translation work when the cookie with the language is not
saved ?
You should first find the problem why your cookie is not saved.
Still you need to have a workaround as many people don't allow to store
cookies.
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
Who knows ? ;-)
Try so use trunk and see if the problem is still there.
Several automatic additions have been applied there (automatic
setMaxFileSize, exception on missing decorator, automatic encoding).
If your problem is still not solved with trunk add a issue with reproducable
code.
See the
Matthew,
Can I somehow get the input buttons not to have a name, therefore not
to present among posted values? It would be very nice to just write
$table-insert($this-_request-getPost()) rather than creating a new
array element-by-element.
I tried to use an ampty and a null value for the name
Hey Joó,
seeing as you do of course validate your form before you insert the
data into your table, you can use $table-insert($form-getValues()).
This should give you the desired result.
Best regards,
Tobias
2009/2/16 Joó Ádám cer...@gmail.com:
Matthew,
Can I somehow get the input buttons not
In mypaginator.phtml, you have something like that:
a href=?= $this-url(array('page' = $page)); ?
?= $page; ?
/a
You must cznge parameters for $this-url(). For example:
a href=?= $this-url(array_merge(array('page' = $page),
$this-dataForPaginatorUrl)); ?
?= $page; ?
Hey Joó,
Just Ádám, please (eastern order)
seeing as you do of course validate your form before you insert the
data into your table, you can use $table-insert($form-getValues()).
This should give you the desired result.
No, it's still there since it has a name attribute and therefore the
Hi
This method is great and what I was after, except that because I am using
error_reporting (E_ALL|E_STRICT);
I get the following error
Strict Standards: Declaration of XXX::fetchAll() should be compatible
with that of Zend_Db_Table_Abstract::fetchAll() in
Here's a favorite trick of mine when I use *_Db_Table:
public function insert(array $data)
{
$data = array_intersect_key($data, array_fill_keys($this-info('cols'),
''));
return parent::insert($data);
}
public function update(array $data, $where)
{
Zend_Db_Table_Row already did it for you:
$table = new MyApp_Db_Table;
$data = $form-getValues();
$row = $table-createRow($data);
$row-save();
// or
$row = $table-createRow();
$row-setFromArray($data);
$row-save();
Mickael
PHPScriptor a écrit :
How I deal with this. I
Mark Wright-3 wrote:
When you use a reference map and dependent tables for cascading row
deletion in the dependent tables how are those rows deleted? Does the
table class issue a sql delete statement or does it go through the row
object? The reason I ask is that I need it to go through
Thanks for everyone, especially for Mickael, it works fine!
Regards,
Ádám
Fantastic..That worked..thank you Matthew.
my final struggle is this
foreach ($this-_campaignCreateForm-getMessages() as $message)
{
$this-flash((Invalid Data: $message\n), 'error',
'/advertiser/create-campaign');
}
returns the flash
william0275 wrote:
If you call delete() or update() on a Zend_Db_Table, it *won't* use the
dependencies/trigger system.
Yes, and that's why I think it's useless to use dependencies in Zend. It
will only delete one level.
e.g
category
- subcategory
- subsubcategory
Delete
SirEdward wrote:
Hi
This method is great and what I was after, except that because I am using
error_reporting (E_ALL|E_STRICT);
I get the following error
Strict Standards: Declaration of XXX::fetchAll() should be compatible
with that of Zend_Db_Table_Abstract::fetchAll() in
-- Joó Ádám cer...@gmail.com wrote
(on Monday, 16 February 2009, 06:09 PM +0100):
Can I somehow get the input buttons not to have a name, therefore not
to present among posted values? It would be very nice to just write
$table-insert($this-_request-getPost()) rather than creating a new
array
-- Bob O b...@electricgraffitti.com wrote
(on Monday, 16 February 2009, 12:49 PM -0800):
Fantastic..That worked..thank you Matthew.
my final struggle is this
foreach ($this-_campaignCreateForm-getMessages() as $message)
{
$this-flash((Invalid Data:
2009/2/17 Paweł Chuchmała pawel.chuchm...@gmail.com:
In mypaginator.phtml, you have something like that:
a href=?= $this-url(array('page' = $page)); ?
?= $page; ?
/a
You must cznge parameters for $this-url(). For example:
a href=?= $this-url(array_merge(array('page' =
Hi,
Although related to my previous post on paginator, this is separate
from what is being discussed before.
Documentation on Zend_Paginator
http://framework.zend.com/manual/en/zend.paginator.usage.html (In the
last para of 36.2.2. Rendering pages with view scripts) suggests that
it accepts four
23 matches
Mail list logo