Quantcast

Using an object in Zend_View's PartialLoop helper

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Using an object in Zend_View's PartialLoop helper

Christer Edvartsen
Since I didn't find anything about this in the docs I wrote a post about it.

http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/

Someone should update the docs about this. I searched this list and saw
that several others have asked about the same. My post includes a
working example on how to go about calling methods on the object we want
to loop in the PartialLoop helper.

--
Christer Edvartsen
[hidden email]
http://cogo.wordpress.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

weierophinney
Administrator
-- Christer Edvartsen <[hidden email]> wrote
(on Friday, 25 April 2008, 04:46 PM +0200):
> Since I didn't find anything about this in the docs I wrote a post about it.
>
> http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/
>
> Someone should update the docs about this. I searched this list and saw  
> that several others have asked about the same. My post includes a  
> working example on how to go about calling methods on the object we want  
> to loop in the PartialLoop helper.

I've verified this isn't in the docs... thought it had made it, but it
didn't.

Could you please create an issue in the tracker to document
setObjectKey() in the Partials documentation? Thanks!

--
Matthew Weier O'Phinney
Software Architect       | [hidden email]
Zend - The PHP Company   | http://www.zend.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

Christer Edvartsen
http://framework.zend.com/issues/browse/ZF-3180

Matthew Weier O'Phinney wrote:

> -- Christer Edvartsen <[hidden email]> wrote
> (on Friday, 25 April 2008, 04:46 PM +0200):
>> Since I didn't find anything about this in the docs I wrote a post about it.
>>
>> http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/
>>
>> Someone should update the docs about this. I searched this list and saw  
>> that several others have asked about the same. My post includes a  
>> working example on how to go about calling methods on the object we want  
>> to loop in the PartialLoop helper.
>
> I've verified this isn't in the docs... thought it had made it, but it
> didn't.
>
> Could you please create an issue in the tracker to document
> setObjectKey() in the Partials documentation? Thanks!
>

--
Christer Edvartsen
[hidden email]
http://cogo.wordpress.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

Dimitri van Hees
In reply to this post by Christer Edvartsen
is it true this doesn't work anymore since the ZF 1.5.2 release??

Christer Edvartsen wrote:
Since I didn't find anything about this in the docs I wrote a post about it.

http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/

Someone should update the docs about this. I searched this list and saw that several others have asked about the same. My post includes a working example on how to go about calling methods on the object we want to loop in the PartialLoop helper.



--


Met vriendelijke groet,

Dimitri van Hees

- -

Dimitri van Hees
[hidden email]

freshheads grafisch ontwerp en internet applicaties
Dunantstraat 1c | 5017 KC Tilburg | Nederland
tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
[hidden email] | www.freshheads.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

RE: Using an object in Zend_View's PartialLoop helper

jwhitcraft

That has been there since one of the 1.5.0 RC releases.  I know it was in the general 1.5.0 release as that is when I started using it full time.

 

I just checked the 1.5.2 tag in the repository and the code is in there for this support.  I have not upgraded to 1.5.2 yet but I’m sure it’s still working.  I will confirm later today and post back to the list.

 

http://www.whitcraftconsulting.com/images/php5_zce_logo.gif

Jon Whitcraft
Indianapolis Motor Speedway
[hidden email]

Phone: (317) 492-8623 :: Fax: (317) 492-6419


 

From: Dimitri van Hees [mailto:[hidden email]]
Sent: Thursday, May 22, 2008 6:57 AM
To: [hidden email]
Subject: Re: [fw-mvc] Using an object in Zend_View's PartialLoop helper

 

is it true this doesn't work anymore since the ZF 1.5.2 release??

Christer Edvartsen wrote:

Since I didn't find anything about this in the docs I wrote a post about it.

http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/

Someone should update the docs about this. I searched this list and saw that several others have asked about the same. My post includes a working example on how to go about calling methods on the object we want to loop in the PartialLoop helper.

 

--


Met vriendelijke groet,

Dimitri van Hees

- -

Dimitri van Hees
[hidden email]

freshheads grafisch ontwerp en internet applicaties
Dunantstraat 1c
| 5017 KC Tilburg | Nederland
tel. +31 (0)13 5448761
| fax. +31 (0)13 5448762
[hidden email]
| www.freshheads.com

********************
********************
This E-mail (and attachments) may contain confidential/privileged information intended only for the named addressee(s). If you are not an intended recipient, do not read, copy, disseminate or take any action based on the content of this E-mail. Please notify the sender by reply E-mail and erase this E-mail from your system. Your assistance is appreciated. E-mail transmission may not be secure or error-free. The company is not responsible for any loss/damage arising from any virus transmitted.
********************
********************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

RE: Using an object in Zend_View's PartialLoop helper

jwhitcraft

I just noticed that it not in the documentation and I put in a issue for it in the tracker

 

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

 

 

 

http://www.whitcraftconsulting.com/images/php5_zce_logo.gif

Jon Whitcraft
Indianapolis Motor Speedway
[hidden email]

Phone: (317) 492-8623 :: Fax: (317) 492-6419


 

From: Whitcraft, Jon [mailto:[hidden email]]
Sent: Thursday, May 22, 2008 7:26 AM
To: Dimitri van Hees; [hidden email]
Subject: RE: [fw-mvc] Using an object in Zend_View's PartialLoop helper

 

That has been there since one of the 1.5.0 RC releases.  I know it was in the general 1.5.0 release as that is when I started using it full time.

 

I just checked the 1.5.2 tag in the repository and the code is in there for this support.  I have not upgraded to 1.5.2 yet but I’m sure it’s still working.  I will confirm later today and post back to the list.

 

http://www.whitcraftconsulting.com/images/php5_zce_logo.gif

Jon Whitcraft
Indianapolis Motor Speedway
[hidden email]

Phone: (317) 492-8623 :: Fax: (317) 492-6419


 

From: Dimitri van Hees [mailto:[hidden email]]
Sent: Thursday, May 22, 2008 6:57 AM
To: [hidden email]
Subject: Re: [fw-mvc] Using an object in Zend_View's PartialLoop helper

 

is it true this doesn't work anymore since the ZF 1.5.2 release??

Christer Edvartsen wrote:

Since I didn't find anything about this in the docs I wrote a post about it.

http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/

Someone should update the docs about this. I searched this list and saw that several others have asked about the same. My post includes a working example on how to go about calling methods on the object we want to loop in the PartialLoop helper.

 

--


Met vriendelijke groet,

Dimitri van Hees

- -

Dimitri van Hees
[hidden email]

freshheads grafisch ontwerp en internet applicaties
Dunantstraat 1c
| 5017 KC Tilburg | Nederland
tel. +31 (0)13 5448761
| fax. +31 (0)13 5448762
[hidden email]
| www.freshheads.com

********************

********************

This E-mail (and attachments) may contain confidential/privileged information intended only for the named addressee(s). If you are not an intended recipient, do not read, copy, disseminate or take any action based on the content of this E-mail. Please notify the sender by reply E-mail and erase this E-mail from your system. Your assistance is appreciated. E-mail transmission may not be secure or error-free. The company is not responsible for any loss/damage arising from any virus transmitted.

********************

********************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

Dimitri van Hees
After upgrading to 1.5.2, this functionality doesn't seem to work anymore for me. I tested my code on a different server (with 1.5.1) and the same code did work there. Has there been any changes?

Whitcraft, Jon wrote:

I just noticed that it not in the documentation and I put in a issue for it in the tracker

 

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

 

 

 

http://www.whitcraftconsulting.com/images/php5_zce_logo.gif

Jon Whitcraft
Indianapolis Motor Speedway
[hidden email]

Phone: (317) 492-8623 :: Fax: (317) 492-6419


 

From: Whitcraft, Jon [[hidden email]]
Sent: Thursday, May 22, 2008 7:26 AM
To: Dimitri van Hees; [hidden email]
Subject: RE: [fw-mvc] Using an object in Zend_View's PartialLoop helper

 

That has been there since one of the 1.5.0 RC releases.  I know it was in the general 1.5.0 release as that is when I started using it full time.

 

I just checked the 1.5.2 tag in the repository and the code is in there for this support.  I have not upgraded to 1.5.2 yet but I’m sure it’s still working.  I will confirm later today and post back to the list.

 

http://www.whitcraftconsulting.com/images/php5_zce_logo.gif

Jon Whitcraft
Indianapolis Motor Speedway
[hidden email]

Phone: (317) 492-8623 :: Fax: (317) 492-6419


 

From: Dimitri van Hees [[hidden email]]
Sent: Thursday, May 22, 2008 6:57 AM
To: [hidden email]
Subject: Re: [fw-mvc] Using an object in Zend_View's PartialLoop helper

 

is it true this doesn't work anymore since the ZF 1.5.2 release??

Christer Edvartsen wrote:

Since I didn't find anything about this in the docs I wrote a post about it.

http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/

Someone should update the docs about this. I searched this list and saw that several others have asked about the same. My post includes a working example on how to go about calling methods on the object we want to loop in the PartialLoop helper.

 

--


Met vriendelijke groet,

Dimitri van Hees

- -

Dimitri van Hees
[hidden email]

freshheads grafisch ontwerp en internet applicaties
Dunantstraat 1c
| 5017 KC Tilburg | Nederland
tel. +31 (0)13 5448761
| fax. +31 (0)13 5448762
[hidden email]
| www.freshheads.com

********************

********************

This E-mail (and attachments) may contain confidential/privileged information intended only for the named addressee(s). If you are not an intended recipient, do not read, copy, disseminate or take any action based on the content of this E-mail. Please notify the sender by reply E-mail and erase this E-mail from your system. Your assistance is appreciated. E-mail transmission may not be secure or error-free. The company is not responsible for any loss/damage arising from any virus transmitted.

********************

********************



--


Met vriendelijke groet,

Dimitri van Hees

- -

Dimitri van Hees
[hidden email]

freshheads grafisch ontwerp en internet applicaties
Dunantstraat 1c | 5017 KC Tilburg | Nederland
tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
[hidden email] | www.freshheads.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

weierophinney
Administrator
-- Dimitri van Hees <[hidden email]> wrote
(on Thursday, 22 May 2008, 03:07 PM +0200):
> After upgrading to 1.5.2, this functionality doesn't seem to work  
> anymore for me. I tested my code on a different server (with 1.5.1) and  
> the same code did work there. Has there been any changes?

The only change for 1.5.2 was to check object type against Traversable
instead of Iterator (which allows more different types of object to be
used with PartialLoop and Partial).


> Whitcraft, Jon wrote:
>>
>> I just noticed that it not in the documentation and I put in a issue  
>> for it in the tracker
>>
>>  
>>
>> http://framework.zend.com/issues/browse/ZF-3307
>>
>>  
>>
>>  
>>
>>  
>>
>> http://www.whitcraftconsulting.com/images/php5_zce_logo.gif 
>> <http://zend.com/zce.php?c=ZEND002524&r=219549271>
>>
>>
>>
>> Jon Whitcraft
>> Indianapolis Motor Speedway
>> [hidden email] <mailto:[hidden email]>
>>
>> Phone: (317) 492-8623 :: Fax: (317) 492-6419
>>
>>
>>  
>>
>> *From:* Whitcraft, Jon [mailto:[hidden email]]
>> *Sent:* Thursday, May 22, 2008 7:26 AM
>> *To:* Dimitri van Hees; [hidden email]
>> *Subject:* RE: [fw-mvc] Using an object in Zend_View's PartialLoop helper
>>
>>  
>>
>> That has been there since one of the 1.5.0 RC releases.  I know it was  
>> in the general 1.5.0 release as that is when I started using it full
>> time.
>>
>>  
>>
>> I just checked the 1.5.2 tag in the repository and the code is in  
>> there for this support.  I have not upgraded to 1.5.2 yet but I'm sure  
>> it's still working.  I will confirm later today and post back to the
>> list.
>>
>>  
>>
>> http://www.whitcraftconsulting.com/images/php5_zce_logo.gif 
>> <http://zend.com/zce.php?c=ZEND002524&r=219549271>
>>
>>
>>
>> Jon Whitcraft
>> Indianapolis Motor Speedway
>> [hidden email] <mailto:[hidden email]>
>>
>> Phone: (317) 492-8623 :: Fax: (317) 492-6419
>>
>>
>>  
>>
>> *From:* Dimitri van Hees [mailto:[hidden email]]
>> *Sent:* Thursday, May 22, 2008 6:57 AM
>> *To:* [hidden email]
>> *Subject:* Re: [fw-mvc] Using an object in Zend_View's PartialLoop helper
>>
>>  
>>
>> is it true this doesn't work anymore since the ZF 1.5.2 release??
>>
>> Christer Edvartsen wrote:
>>
>> Since I didn't find anything about this in the docs I wrote a post  
>> about it.
>>
 

>> http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/ 
>>
>>
>>
>> Someone should update the docs about this. I searched this list and  
>> saw that several others have asked about the same. My post includes a  
>> working example on how to go about calling methods on the object we  
>> want to loop in the PartialLoop helper.
>>
>>  
>>
>> --
>>
>>
>> Met vriendelijke groet,
>>
>> Dimitri van Hees
>>
>> - -
>>
>> Dimitri van Hees
>> [hidden email] <mailto:[hidden email]>
>>
>> *freshheads* grafisch ontwerp en internet applicaties
>> Dunantstraat 1c | 5017 KC Tilburg | Nederland
>> tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
>> [hidden email] <mailto:[hidden email]> | www.freshheads.com  
>> <http://www.freshheads.com>
>>
>> ********************
>>
>> ********************
>>
>> This E-mail (and attachments) may contain confidential/privileged  
>> information intended only for the named addressee(s). If you are not  
>> an intended recipient, do not read, copy, disseminate or take any  
>> action based on the content of this E-mail. Please notify the sender  
>> by reply E-mail and erase this E-mail from your system. Your  
>> assistance is appreciated. E-mail transmission may not be secure or  
>> error-free. The company is not responsible for any loss/damage arising  
>> from any virus transmitted.
>>
>> ********************
>>
>> ********************
>>
>
>
> --
>
>
> Met vriendelijke groet,
>
> Dimitri van Hees
>
> - -
>
> Dimitri van Hees
> [hidden email]
>
> *freshheads* grafisch ontwerp en internet applicaties
> Dunantstraat 1c | 5017 KC Tilburg | Nederland
> tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
> [hidden email] | www.freshheads.com

--
Matthew Weier O'Phinney
Software Architect       | [hidden email]
Zend - The PHP Company   | http://www.zend.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

Dimitri van Hees
So... now how am I supposed to pass my db table rowset to the partialloop? For each partial, I want to use the database relations, for example $this->record->findDependentRows. This worked fine for me when using
$this->partialLoop()->setObjectKey('record')->partialLoop('loop.phtml', $rowset);

Does this change has anything to do with it, or is my server broken since the upgrade to 1.5.2?

Thanks anyway!

Matthew Weier O'Phinney wrote:
-- Dimitri van Hees [hidden email] wrote
(on Thursday, 22 May 2008, 03:07 PM +0200):
  
After upgrading to 1.5.2, this functionality doesn't seem to work  
anymore for me. I tested my code on a different server (with 1.5.1) and  
the same code did work there. Has there been any changes?
    

The only change for 1.5.2 was to check object type against Traversable
instead of Iterator (which allows more different types of object to be
used with PartialLoop and Partial).


  
Whitcraft, Jon wrote:
    
I just noticed that it not in the documentation and I put in a issue  
for it in the tracker

 

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

 

 

 

http://www.whitcraftconsulting.com/images/php5_zce_logo.gif  
<http://zend.com/zce.php?c=ZEND002524&r=219549271>

	

Jon Whitcraft
Indianapolis Motor Speedway
[hidden email] [hidden email]

Phone: (317) 492-8623 :: Fax: (317) 492-6419


 

*From:* Whitcraft, Jon [[hidden email]]
*Sent:* Thursday, May 22, 2008 7:26 AM
*To:* Dimitri van Hees; [hidden email]
*Subject:* RE: [fw-mvc] Using an object in Zend_View's PartialLoop helper

 

That has been there since one of the 1.5.0 RC releases.  I know it was  
in the general 1.5.0 release as that is when I started using it full 
time.

 

I just checked the 1.5.2 tag in the repository and the code is in  
there for this support.  I have not upgraded to 1.5.2 yet but I'm sure  
it's still working.  I will confirm later today and post back to the 
list.

 

http://www.whitcraftconsulting.com/images/php5_zce_logo.gif  
<http://zend.com/zce.php?c=ZEND002524&r=219549271>

	

Jon Whitcraft
Indianapolis Motor Speedway
[hidden email] [hidden email]

Phone: (317) 492-8623 :: Fax: (317) 492-6419


 

*From:* Dimitri van Hees [[hidden email]]
*Sent:* Thursday, May 22, 2008 6:57 AM
*To:* [hidden email]
*Subject:* Re: [fw-mvc] Using an object in Zend_View's PartialLoop helper

 

is it true this doesn't work anymore since the ZF 1.5.2 release??

Christer Edvartsen wrote:

Since I didn't find anything about this in the docs I wrote a post  
about it.

      
 
  
http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/ 



Someone should update the docs about this. I searched this list and  
saw that several others have asked about the same. My post includes a  
working example on how to go about calling methods on the object we  
want to loop in the PartialLoop helper.

 

-- 


Met vriendelijke groet,

Dimitri van Hees

- -

Dimitri van Hees
[hidden email] [hidden email]

*freshheads* grafisch ontwerp en internet applicaties
Dunantstraat 1c | 5017 KC Tilburg | Nederland
tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
[hidden email] [hidden email] | www.freshheads.com  
<http://www.freshheads.com>

********************

********************

This E-mail (and attachments) may contain confidential/privileged  
information intended only for the named addressee(s). If you are not  
an intended recipient, do not read, copy, disseminate or take any  
action based on the content of this E-mail. Please notify the sender  
by reply E-mail and erase this E-mail from your system. Your  
assistance is appreciated. E-mail transmission may not be secure or  
error-free. The company is not responsible for any loss/damage arising  
from any virus transmitted.

********************

********************

      
-- 


Met vriendelijke groet,

Dimitri van Hees

- -

Dimitri van Hees
[hidden email]

*freshheads* grafisch ontwerp en internet applicaties
Dunantstraat 1c | 5017 KC Tilburg | Nederland
tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
[hidden email] | www.freshheads.com
    

  


--


Met vriendelijke groet,

Dimitri van Hees

- -

Dimitri van Hees
[hidden email]

freshheads grafisch ontwerp en internet applicaties
Dunantstraat 1c | 5017 KC Tilburg | Nederland
tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
[hidden email] | www.freshheads.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

Andries Seutens

Hi,

Zend_Db_Table_Rowset_Abstract implements SeekableIterator, which in turn
implements Iterator, and in turn Traversable.
Thus it should work ...

Best,

Andriesss

Dimitri van Hees schreef:

> So... now how am I supposed to pass my db table rowset to the
> partialloop? For each partial, I want to use the database relations,
> for example $this->record->findDependentRows. This worked fine for me
> when using
> $this->partialLoop()->setObjectKey('record')->partialLoop('loop.phtml', $rowset);
>
> Does this change has anything to do with it, or is my server broken since the upgrade to 1.5.2?
>
> Thanks anyway!
>  
>
> Matthew Weier O'Phinney wrote:
>> -- Dimitri van Hees <[hidden email]> wrote
>> (on Thursday, 22 May 2008, 03:07 PM +0200):
>>  
>>> After upgrading to 1.5.2, this functionality doesn't seem to work  
>>> anymore for me. I tested my code on a different server (with 1.5.1) and  
>>> the same code did work there. Has there been any changes?
>>>    
>>
>> The only change for 1.5.2 was to check object type against Traversable
>> instead of Iterator (which allows more different types of object to be
>> used with PartialLoop and Partial).
>>
>>
>>  
>>> Whitcraft, Jon wrote:
>>>    
>>>> I just noticed that it not in the documentation and I put in a issue  
>>>> for it in the tracker
>>>>
>>>>  
>>>>
>>>> http://framework.zend.com/issues/browse/ZF-3307
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> http://www.whitcraftconsulting.com/images/php5_zce_logo.gif 
>>>> <http://zend.com/zce.php?c=ZEND002524&r=219549271>
>>>>
>>>>
>>>>
>>>> Jon Whitcraft
>>>> Indianapolis Motor Speedway
>>>> [hidden email] <mailto:[hidden email]>
>>>>
>>>> Phone: (317) 492-8623 :: Fax: (317) 492-6419
>>>>
>>>>
>>>>  
>>>>
>>>> *From:* Whitcraft, Jon [mailto:[hidden email]]
>>>> *Sent:* Thursday, May 22, 2008 7:26 AM
>>>> *To:* Dimitri van Hees; [hidden email]
>>>> *Subject:* RE: [fw-mvc] Using an object in Zend_View's PartialLoop helper
>>>>
>>>>  
>>>>
>>>> That has been there since one of the 1.5.0 RC releases.  I know it was  
>>>> in the general 1.5.0 release as that is when I started using it full
>>>> time.
>>>>
>>>>  
>>>>
>>>> I just checked the 1.5.2 tag in the repository and the code is in  
>>>> there for this support.  I have not upgraded to 1.5.2 yet but I'm sure  
>>>> it's still working.  I will confirm later today and post back to the
>>>> list.
>>>>
>>>>  
>>>>
>>>> http://www.whitcraftconsulting.com/images/php5_zce_logo.gif 
>>>> <http://zend.com/zce.php?c=ZEND002524&r=219549271>
>>>>
>>>>
>>>>
>>>> Jon Whitcraft
>>>> Indianapolis Motor Speedway
>>>> [hidden email] <mailto:[hidden email]>
>>>>
>>>> Phone: (317) 492-8623 :: Fax: (317) 492-6419
>>>>
>>>>
>>>>  
>>>>
>>>> *From:* Dimitri van Hees [mailto:[hidden email]]
>>>> *Sent:* Thursday, May 22, 2008 6:57 AM
>>>> *To:* [hidden email]
>>>> *Subject:* Re: [fw-mvc] Using an object in Zend_View's PartialLoop helper
>>>>
>>>>  
>>>>
>>>> is it true this doesn't work anymore since the ZF 1.5.2 release??
>>>>
>>>> Christer Edvartsen wrote:
>>>>
>>>> Since I didn't find anything about this in the docs I wrote a post  
>>>> about it.
>>>>
>>>>      
>>  
>>  
>>>> http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/ 
>>>>
>>>>
>>>>
>>>> Someone should update the docs about this. I searched this list and  
>>>> saw that several others have asked about the same. My post includes a  
>>>> working example on how to go about calling methods on the object we  
>>>> want to loop in the PartialLoop helper.
>>>>
>>>>  
>>>>
>>>> --
>>>>
>>>>
>>>> Met vriendelijke groet,
>>>>
>>>> Dimitri van Hees
>>>>
>>>> - -
>>>>
>>>> Dimitri van Hees
>>>> [hidden email] <mailto:[hidden email]>
>>>>
>>>> *freshheads* grafisch ontwerp en internet applicaties
>>>> Dunantstraat 1c | 5017 KC Tilburg | Nederland
>>>> tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
>>>> [hidden email] <mailto:[hidden email]> | www.freshheads.com  
>>>> <http://www.freshheads.com>
>>>>
>>>> ********************
>>>>
>>>> ********************
>>>>
>>>> This E-mail (and attachments) may contain confidential/privileged  
>>>> information intended only for the named addressee(s). If you are not  
>>>> an intended recipient, do not read, copy, disseminate or take any  
>>>> action based on the content of this E-mail. Please notify the sender  
>>>> by reply E-mail and erase this E-mail from your system. Your  
>>>> assistance is appreciated. E-mail transmission may not be secure or  
>>>> error-free. The company is not responsible for any loss/damage arising  
>>>> from any virus transmitted.
>>>>
>>>> ********************
>>>>
>>>> ********************
>>>>
>>>>      
>>> --
>>>
>>>
>>> Met vriendelijke groet,
>>>
>>> Dimitri van Hees
>>>
>>> - -
>>>
>>> Dimitri van Hees
>>> [hidden email]
>>>
>>> *freshheads* grafisch ontwerp en internet applicaties
>>> Dunantstraat 1c | 5017 KC Tilburg | Nederland
>>> tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
>>> [hidden email] | www.freshheads.com
>>>    
>>
>>  
>
>
> --
>
>
> Met vriendelijke groet,
>
> Dimitri van Hees
>
> - -
>
> Dimitri van Hees
> [hidden email]
>
> *freshheads* grafisch ontwerp en internet applicaties
> Dunantstraat 1c | 5017 KC Tilburg | Nederland
> tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
> [hidden email] | www.freshheads.com
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 269.24.0/1459 - Release Date: 21/05/2008 17:34
>  

Gecontroleerd op virussen door de JOJO Secure Gateway.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

weierophinney
Administrator
In reply to this post by Dimitri van Hees
-- Dimitri van Hees <[hidden email]> wrote
(on Thursday, 22 May 2008, 04:42 PM +0200):
> So... now how am I supposed to pass my db table rowset to the
> partialloop? For each partial, I want to use the database relations,
> for example $this->record-> findDependentRows. This worked fine for me
> when using
>
> $this->partialLoop()->setObjectKey('record')->partialLoop('loop.phtml', $rowset);
>
> Does this change has anything to do with it, or is my server broken
> since the upgrade to 1.5.2?

That should be working, but I'll run some tests to verify; if not, I'll
open an issue so we can fix it.


> Matthew Weier O'Phinney wrote:
>
>     -- Dimitri van Hees <[hidden email]> wrote
>     (on Thursday, 22 May 2008, 03:07 PM +0200):
>
>
>         After upgrading to 1.5.2, this functionality doesn't seem to work
>         anymore for me. I tested my code on a different server (with 1.5.1) and
>         the same code did work there. Has there been any changes?
>
>
>
>     The only change for 1.5.2 was to check object type against Traversable
>     instead of Iterator (which allows more different types of object to be
>     used with PartialLoop and Partial).
>
>
>
>
>         Whitcraft, Jon wrote:
>
>
>             I just noticed that it not in the documentation and I put in a issue
>             for it in the tracker
>
>
>
>             http://framework.zend.com/issues/browse/ZF-3307
>
>
>
>
>
>
>
>             http://www.whitcraftconsulting.com/images/php5_zce_logo.gif
>             <http://zend.com/zce.php?c=ZEND002524&r=219549271>
>
>
>
>             Jon Whitcraft
>             Indianapolis Motor Speedway
>             [hidden email] <mailto:[hidden email]>
>
>             Phone: (317) 492-8623 :: Fax: (317) 492-6419
>
>
>
>
>             *From:* Whitcraft, Jon [mailto:[hidden email]]
>             *Sent:* Thursday, May 22, 2008 7:26 AM
>             *To:* Dimitri van Hees; [hidden email]
>             *Subject:* RE: [fw-mvc] Using an object in Zend_View's PartialLoop helper
>
>
>
>             That has been there since one of the 1.5.0 RC releases.  I know it was
>             in the general 1.5.0 release as that is when I started using it full
>             time.
>
>
>
>             I just checked the 1.5.2 tag in the repository and the code is in
>             there for this support.  I have not upgraded to 1.5.2 yet but I'm sure
>             it's still working.  I will confirm later today and post back to the
>             list.
>
>
>
>             http://www.whitcraftconsulting.com/images/php5_zce_logo.gif
>             <http://zend.com/zce.php?c=ZEND002524&r=219549271>
>
>
>
>             Jon Whitcraft
>             Indianapolis Motor Speedway
>             [hidden email] <mailto:[hidden email]>
>
>             Phone: (317) 492-8623 :: Fax: (317) 492-6419
>
>
>
>
>             *From:* Dimitri van Hees [mailto:[hidden email]]
>             *Sent:* Thursday, May 22, 2008 6:57 AM
>             *To:* [hidden email]
>             *Subject:* Re: [fw-mvc] Using an object in Zend_View's PartialLoop helper
>
>
>
>             is it true this doesn't work anymore since the ZF 1.5.2 release??
>
>             Christer Edvartsen wrote:
>
>             Since I didn't find anything about this in the docs I wrote a post
>             about it.
>
>
>
>
>
>
>
>             http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/
>
>
>
>             Someone should update the docs about this. I searched this list and
>             saw that several others have asked about the same. My post includes a
>             working example on how to go about calling methods on the object we
>             want to loop in the PartialLoop helper.
>
>
>
>             --
>
>
>             Met vriendelijke groet,
>
>             Dimitri van Hees
>
>             - -
>
>             Dimitri van Hees
>             [hidden email] <mailto:[hidden email]>
>
>             *freshheads* grafisch ontwerp en internet applicaties
>             Dunantstraat 1c | 5017 KC Tilburg | Nederland
>             tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
>             [hidden email] <mailto:[hidden email]> | www.freshheads.com
>             <http://www.freshheads.com>
>
>             ********************
>
>             ********************
>
>             This E-mail (and attachments) may contain confidential/privileged
>             information intended only for the named addressee(s). If you are not
>             an intended recipient, do not read, copy, disseminate or take any
>             action based on the content of this E-mail. Please notify the sender
>             by reply E-mail and erase this E-mail from your system. Your
>             assistance is appreciated. E-mail transmission may not be secure or
>             error-free. The company is not responsible for any loss/damage arising
>             from any virus transmitted.
>
>             ********************
>
>             ********************
>
>
>
>
>         --
>
>
>         Met vriendelijke groet,
>
>         Dimitri van Hees
>
>         - -
>
>         Dimitri van Hees
>         [hidden email]
>
>         *freshheads* grafisch ontwerp en internet applicaties
>         Dunantstraat 1c | 5017 KC Tilburg | Nederland
>         tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
>         [hidden email] | www.freshheads.com
>
>
>
>
>
>
>
>
> --
>
>
> Met vriendelijke groet,
>
> Dimitri van Hees
>
> - -
>
> Dimitri van Hees
> [hidden email]
>
> freshheads grafisch ontwerp en internet applicaties
> Dunantstraat 1c | 5017 KC Tilburg | Nederland
> tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
> [hidden email] | www.freshheads.com

--
Matthew Weier O'Phinney
Software Architect       | [hidden email]
Zend - The PHP Company   | http://www.zend.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

Andries Seutens
In reply to this post by Andries Seutens

Please also see:
http://framework.zend.com/issues/browse/ZF-3157


Best,

Andriesss

Andries Seutens schreef:

>
> Hi,
>
> Zend_Db_Table_Rowset_Abstract implements SeekableIterator, which in
> turn implements Iterator, and in turn Traversable.
> Thus it should work ...
>
> Best,
>
> Andriesss
>
> Dimitri van Hees schreef:
>> So... now how am I supposed to pass my db table rowset to the
>> partialloop? For each partial, I want to use the database relations,
>> for example $this->record->findDependentRows. This worked fine for me
>> when using
>> $this->partialLoop()->setObjectKey('record')->partialLoop('loop.phtml',
>> $rowset);
>>
>> Does this change has anything to do with it, or is my server broken
>> since the upgrade to 1.5.2?
>>
>> Thanks anyway!
>>  
>> Matthew Weier O'Phinney wrote:
>>> -- Dimitri van Hees <[hidden email]> wrote
>>> (on Thursday, 22 May 2008, 03:07 PM +0200):
>>>  
>>>> After upgrading to 1.5.2, this functionality doesn't seem to work  
>>>> anymore for me. I tested my code on a different server (with 1.5.1)
>>>> and  the same code did work there. Has there been any changes?
>>>>    
>>>
>>> The only change for 1.5.2 was to check object type against Traversable
>>> instead of Iterator (which allows more different types of object to be
>>> used with PartialLoop and Partial).
>>>
>>>
>>>  
>>>> Whitcraft, Jon wrote:
>>>>    
>>>>> I just noticed that it not in the documentation and I put in a
>>>>> issue  for it in the tracker
>>>>>
>>>>>  
>>>>>
>>>>> http://framework.zend.com/issues/browse/ZF-3307
>>>>>
>>>>>  
>>>>>
>>>>>  
>>>>>
>>>>>  
>>>>>
>>>>> http://www.whitcraftconsulting.com/images/php5_zce_logo.gif 
>>>>> <http://zend.com/zce.php?c=ZEND002524&r=219549271>
>>>>>
>>>>>    
>>>>>
>>>>> Jon Whitcraft
>>>>> Indianapolis Motor Speedway
>>>>> [hidden email] <mailto:[hidden email]>
>>>>>
>>>>> Phone: (317) 492-8623 :: Fax: (317) 492-6419
>>>>>
>>>>>
>>>>>  
>>>>>
>>>>> *From:* Whitcraft, Jon [mailto:[hidden email]]
>>>>> *Sent:* Thursday, May 22, 2008 7:26 AM
>>>>> *To:* Dimitri van Hees; [hidden email]
>>>>> *Subject:* RE: [fw-mvc] Using an object in Zend_View's PartialLoop
>>>>> helper
>>>>>
>>>>>  
>>>>>
>>>>> That has been there since one of the 1.5.0 RC releases.  I know it
>>>>> was  in the general 1.5.0 release as that is when I started using
>>>>> it full time.
>>>>>
>>>>>  
>>>>>
>>>>> I just checked the 1.5.2 tag in the repository and the code is in  
>>>>> there for this support.  I have not upgraded to 1.5.2 yet but I'm
>>>>> sure  it's still working.  I will confirm later today and post
>>>>> back to the list.
>>>>>
>>>>>  
>>>>>
>>>>> http://www.whitcraftconsulting.com/images/php5_zce_logo.gif 
>>>>> <http://zend.com/zce.php?c=ZEND002524&r=219549271>
>>>>>
>>>>>    
>>>>>
>>>>> Jon Whitcraft
>>>>> Indianapolis Motor Speedway
>>>>> [hidden email] <mailto:[hidden email]>
>>>>>
>>>>> Phone: (317) 492-8623 :: Fax: (317) 492-6419
>>>>>
>>>>>
>>>>>  
>>>>>
>>>>> *From:* Dimitri van Hees [mailto:[hidden email]]
>>>>> *Sent:* Thursday, May 22, 2008 6:57 AM
>>>>> *To:* [hidden email]
>>>>> *Subject:* Re: [fw-mvc] Using an object in Zend_View's PartialLoop
>>>>> helper
>>>>>
>>>>>  
>>>>>
>>>>> is it true this doesn't work anymore since the ZF 1.5.2 release??
>>>>>
>>>>> Christer Edvartsen wrote:
>>>>>
>>>>> Since I didn't find anything about this in the docs I wrote a
>>>>> post  about it.
>>>>>
>>>>>      
>>>  
>>>  
>>>>> http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/ 
>>>>>
>>>>>
>>>>>
>>>>> Someone should update the docs about this. I searched this list
>>>>> and  saw that several others have asked about the same. My post
>>>>> includes a  working example on how to go about calling methods on
>>>>> the object we  want to loop in the PartialLoop helper.
>>>>>
>>>>>  
>>>>>
>>>>> --
>>>>>
>>>>>
>>>>> Met vriendelijke groet,
>>>>>
>>>>> Dimitri van Hees
>>>>>
>>>>> - -
>>>>>
>>>>> Dimitri van Hees
>>>>> [hidden email] <mailto:[hidden email]>
>>>>>
>>>>> *freshheads* grafisch ontwerp en internet applicaties
>>>>> Dunantstraat 1c | 5017 KC Tilburg | Nederland
>>>>> tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
>>>>> [hidden email] <mailto:[hidden email]> |
>>>>> www.freshheads.com  <http://www.freshheads.com>
>>>>>
>>>>> ********************
>>>>>
>>>>> ********************
>>>>>
>>>>> This E-mail (and attachments) may contain confidential/privileged  
>>>>> information intended only for the named addressee(s). If you are
>>>>> not  an intended recipient, do not read, copy, disseminate or take
>>>>> any  action based on the content of this E-mail. Please notify the
>>>>> sender  by reply E-mail and erase this E-mail from your system.
>>>>> Your  assistance is appreciated. E-mail transmission may not be
>>>>> secure or  error-free. The company is not responsible for any
>>>>> loss/damage arising  from any virus transmitted.
>>>>>
>>>>> ********************
>>>>>
>>>>> ********************
>>>>>
>>>>>      
>>>> --
>>>>
>>>>
>>>> Met vriendelijke groet,
>>>>
>>>> Dimitri van Hees
>>>>
>>>> - -
>>>>
>>>> Dimitri van Hees
>>>> [hidden email]
>>>>
>>>> *freshheads* grafisch ontwerp en internet applicaties
>>>> Dunantstraat 1c | 5017 KC Tilburg | Nederland
>>>> tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
>>>> [hidden email] | www.freshheads.com
>>>>    
>>>
>>>  
>>
>>
>> --
>>
>>
>> Met vriendelijke groet,
>>
>> Dimitri van Hees
>>
>> - -
>>
>> Dimitri van Hees
>> [hidden email]
>>
>> *freshheads* grafisch ontwerp en internet applicaties
>> Dunantstraat 1c | 5017 KC Tilburg | Nederland
>> tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
>> [hidden email] | www.freshheads.com
>> ------------------------------------------------------------------------
>>
>> No virus found in this incoming message.
>> Checked by AVG. Version: 7.5.524 / Virus Database: 269.24.0/1459 -
>> Release Date: 21/05/2008 17:34
>>  
> ------------------------------------------------------------------------
>
> Gecontroleerd op virussen door de JOJO Secure Gateway.
>  
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 269.24.0/1459 - Release Date: 21/05/2008 17:34
>  

Gecontroleerd op virussen door de JOJO Secure Gateway.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

weierophinney
Administrator
In reply to this post by weierophinney
-- Matthew Weier O'Phinney <[hidden email]> wrote
(on Thursday, 22 May 2008, 10:53 AM -0400):

> -- Dimitri van Hees <[hidden email]> wrote
> (on Thursday, 22 May 2008, 04:42 PM +0200):
> > So... now how am I supposed to pass my db table rowset to the
> > partialloop? For each partial, I want to use the database relations,
> > for example $this->record-> findDependentRows. This worked fine for me
> > when using
> >
> > $this->partialLoop()->setObjectKey('record')->partialLoop('loop.phtml', $rowset);
> >
> > Does this change has anything to do with it, or is my server broken
> > since the upgrade to 1.5.2?
>
> That should be working, but I'll run some tests to verify; if not, I'll
> open an issue so we can fix it.

I see what's happening.

PartialLoop checks to see if the model class implements a toArray()
method, and, if so, casts the model to an array.
Zend_Db_Table_Rowset_Abstract implements a toArray() method, which not
only casts the rowset to an array, but all rows it contains -- which
means that the ObjectKey is never used.

This behavior should be changed; if the object is Traversable, we should
simply iterate over it.

Do you have rights to the issue tracker? If so, please post an issue; if
not, I will.

> > Matthew Weier O'Phinney wrote:
> >
> >     -- Dimitri van Hees <[hidden email]> wrote
> >     (on Thursday, 22 May 2008, 03:07 PM +0200):
> >
> >
> >         After upgrading to 1.5.2, this functionality doesn't seem to work
> >         anymore for me. I tested my code on a different server (with 1.5.1) and
> >         the same code did work there. Has there been any changes?
> >
> >
> >
> >     The only change for 1.5.2 was to check object type against Traversable
> >     instead of Iterator (which allows more different types of object to be
> >     used with PartialLoop and Partial).
> >
> >
> >
> >
> >         Whitcraft, Jon wrote:
> >
> >
> >             I just noticed that it not in the documentation and I put in a issue
> >             for it in the tracker
> >
> >
> >
> >             http://framework.zend.com/issues/browse/ZF-3307
> >
> >
> >
> >
> >
> >
> >
> >             http://www.whitcraftconsulting.com/images/php5_zce_logo.gif
> >             <http://zend.com/zce.php?c=ZEND002524&r=219549271>
> >
> >
> >
> >             Jon Whitcraft
> >             Indianapolis Motor Speedway
> >             [hidden email] <mailto:[hidden email]>
> >
> >             Phone: (317) 492-8623 :: Fax: (317) 492-6419
> >
> >
> >
> >
> >             *From:* Whitcraft, Jon [mailto:[hidden email]]
> >             *Sent:* Thursday, May 22, 2008 7:26 AM
> >             *To:* Dimitri van Hees; [hidden email]
> >             *Subject:* RE: [fw-mvc] Using an object in Zend_View's PartialLoop helper
> >
> >
> >
> >             That has been there since one of the 1.5.0 RC releases.  I know it was
> >             in the general 1.5.0 release as that is when I started using it full
> >             time.
> >
> >
> >
> >             I just checked the 1.5.2 tag in the repository and the code is in
> >             there for this support.  I have not upgraded to 1.5.2 yet but I'm sure
> >             it's still working.  I will confirm later today and post back to the
> >             list.
> >
> >
> >
> >             http://www.whitcraftconsulting.com/images/php5_zce_logo.gif
> >             <http://zend.com/zce.php?c=ZEND002524&r=219549271>
> >
> >
> >
> >             Jon Whitcraft
> >             Indianapolis Motor Speedway
> >             [hidden email] <mailto:[hidden email]>
> >
> >             Phone: (317) 492-8623 :: Fax: (317) 492-6419
> >
> >
> >
> >
> >             *From:* Dimitri van Hees [mailto:[hidden email]]
> >             *Sent:* Thursday, May 22, 2008 6:57 AM
> >             *To:* [hidden email]
> >             *Subject:* Re: [fw-mvc] Using an object in Zend_View's PartialLoop helper
> >
> >
> >
> >             is it true this doesn't work anymore since the ZF 1.5.2 release??
> >
> >             Christer Edvartsen wrote:
> >
> >             Since I didn't find anything about this in the docs I wrote a post
> >             about it.
> >
> >
> >
> >
> >
> >
> >
> >             http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/
> >
> >
> >
> >             Someone should update the docs about this. I searched this list and
> >             saw that several others have asked about the same. My post includes a
> >             working example on how to go about calling methods on the object we
> >             want to loop in the PartialLoop helper.
> >
> >
> >
> >             --
> >
> >
> >             Met vriendelijke groet,
> >
> >             Dimitri van Hees
> >
> >             - -
> >
> >             Dimitri van Hees
> >             [hidden email] <mailto:[hidden email]>
> >
> >             *freshheads* grafisch ontwerp en internet applicaties
> >             Dunantstraat 1c | 5017 KC Tilburg | Nederland
> >             tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
> >             [hidden email] <mailto:[hidden email]> | www.freshheads.com
> >             <http://www.freshheads.com>
> >
> >             ********************
> >
> >             ********************
> >
> >             This E-mail (and attachments) may contain confidential/privileged
> >             information intended only for the named addressee(s). If you are not
> >             an intended recipient, do not read, copy, disseminate or take any
> >             action based on the content of this E-mail. Please notify the sender
> >             by reply E-mail and erase this E-mail from your system. Your
> >             assistance is appreciated. E-mail transmission may not be secure or
> >             error-free. The company is not responsible for any loss/damage arising
> >             from any virus transmitted.
> >
> >             ********************
> >
> >             ********************
> >
> >
> >
> >
> >         --
> >
> >
> >         Met vriendelijke groet,
> >
> >         Dimitri van Hees
> >
> >         - -
> >
> >         Dimitri van Hees
> >         [hidden email]
> >
> >         *freshheads* grafisch ontwerp en internet applicaties
> >         Dunantstraat 1c | 5017 KC Tilburg | Nederland
> >         tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
> >         [hidden email] | www.freshheads.com
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> >
> >
> > Met vriendelijke groet,
> >
> > Dimitri van Hees
> >
> > - -
> >
> > Dimitri van Hees
> > [hidden email]
> >
> > freshheads grafisch ontwerp en internet applicaties
> > Dunantstraat 1c | 5017 KC Tilburg | Nederland
> > tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
> > [hidden email] | www.freshheads.com
>
> --
> Matthew Weier O'Phinney
> Software Architect       | [hidden email]
> Zend - The PHP Company   | http://www.zend.com/
>

--
Matthew Weier O'Phinney
Software Architect       | [hidden email]
Zend - The PHP Company   | http://www.zend.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

Dimitri van Hees
are there any updates concerning this issue? this really is a showstopper for me as my online scripts won't work anymore after the update to 1.5.2. therefore I have to stick with 1.5.1 on my live environment until this issue has been solved. is there a way to bypass this problem?

Matthew Weier O'Phinney wrote:
-- Matthew Weier O'Phinney [hidden email] wrote
(on Thursday, 22 May 2008, 10:53 AM -0400):
  
-- Dimitri van Hees [hidden email] wrote
(on Thursday, 22 May 2008, 04:42 PM +0200):
    
So... now how am I supposed to pass my db table rowset to the
partialloop? For each partial, I want to use the database relations,
for example $this->record-> findDependentRows. This worked fine for me
when using

$this->partialLoop()->setObjectKey('record')->partialLoop('loop.phtml', $rowset);

Does this change has anything to do with it, or is my server broken
since the upgrade to 1.5.2?
      
That should be working, but I'll run some tests to verify; if not, I'll
open an issue so we can fix it.
    

I see what's happening.

PartialLoop checks to see if the model class implements a toArray()
method, and, if so, casts the model to an array.
Zend_Db_Table_Rowset_Abstract implements a toArray() method, which not
only casts the rowset to an array, but all rows it contains -- which
means that the ObjectKey is never used.

This behavior should be changed; if the object is Traversable, we should
simply iterate over it.

Do you have rights to the issue tracker? If so, please post an issue; if
not, I will.

  
Matthew Weier O'Phinney wrote:

    -- Dimitri van Hees [hidden email] wrote
    (on Thursday, 22 May 2008, 03:07 PM +0200):


        After upgrading to 1.5.2, this functionality doesn't seem to work
        anymore for me. I tested my code on a different server (with 1.5.1) and
        the same code did work there. Has there been any changes?



    The only change for 1.5.2 was to check object type against Traversable
    instead of Iterator (which allows more different types of object to be
    used with PartialLoop and Partial).




        Whitcraft, Jon wrote:


            I just noticed that it not in the documentation and I put in a issue
            for it in the tracker



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







            http://www.whitcraftconsulting.com/images/php5_zce_logo.gif
            <http://zend.com/zce.php?c=ZEND002524&r=219549271>



            Jon Whitcraft
            Indianapolis Motor Speedway
            [hidden email] [hidden email]

            Phone: (317) 492-8623 :: Fax: (317) 492-6419




            *From:* Whitcraft, Jon [[hidden email]]
            *Sent:* Thursday, May 22, 2008 7:26 AM
            *To:* Dimitri van Hees; [hidden email]
            *Subject:* RE: [fw-mvc] Using an object in Zend_View's PartialLoop helper



            That has been there since one of the 1.5.0 RC releases.  I know it was
            in the general 1.5.0 release as that is when I started using it full
            time.



            I just checked the 1.5.2 tag in the repository and the code is in
            there for this support.  I have not upgraded to 1.5.2 yet but I'm sure
            it's still working.  I will confirm later today and post back to the
            list.



            http://www.whitcraftconsulting.com/images/php5_zce_logo.gif
            <http://zend.com/zce.php?c=ZEND002524&r=219549271>



            Jon Whitcraft
            Indianapolis Motor Speedway
            [hidden email] [hidden email]

            Phone: (317) 492-8623 :: Fax: (317) 492-6419




            *From:* Dimitri van Hees [[hidden email]]
            *Sent:* Thursday, May 22, 2008 6:57 AM
            *To:* [hidden email]
            *Subject:* Re: [fw-mvc] Using an object in Zend_View's PartialLoop helper



            is it true this doesn't work anymore since the ZF 1.5.2 release??

            Christer Edvartsen wrote:

            Since I didn't find anything about this in the docs I wrote a post
            about it.







            http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/



            Someone should update the docs about this. I searched this list and
            saw that several others have asked about the same. My post includes a
            working example on how to go about calling methods on the object we
            want to loop in the PartialLoop helper.



            --


            Met vriendelijke groet,

            Dimitri van Hees

            - -

            Dimitri van Hees
            [hidden email] [hidden email]

            *freshheads* grafisch ontwerp en internet applicaties
            Dunantstraat 1c | 5017 KC Tilburg | Nederland
            tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
            [hidden email] [hidden email] | www.freshheads.com
            <http://www.freshheads.com>

            ********************

            ********************

            This E-mail (and attachments) may contain confidential/privileged
            information intended only for the named addressee(s). If you are not
            an intended recipient, do not read, copy, disseminate or take any
            action based on the content of this E-mail. Please notify the sender
            by reply E-mail and erase this E-mail from your system. Your
            assistance is appreciated. E-mail transmission may not be secure or
            error-free. The company is not responsible for any loss/damage arising
            from any virus transmitted.

            ********************

            ********************




        --


        Met vriendelijke groet,

        Dimitri van Hees

        - -

        Dimitri van Hees
        [hidden email]

        *freshheads* grafisch ontwerp en internet applicaties
        Dunantstraat 1c | 5017 KC Tilburg | Nederland
        tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
        [hidden email] | www.freshheads.com








--


Met vriendelijke groet,

Dimitri van Hees

- -

Dimitri van Hees
[hidden email]

freshheads grafisch ontwerp en internet applicaties
Dunantstraat 1c | 5017 KC Tilburg | Nederland
tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
[hidden email] | www.freshheads.com
      
-- 
Matthew Weier O'Phinney
Software Architect       | [hidden email]
Zend - The PHP Company   | http://www.zend.com/

    

  


--


Met vriendelijke groet,

Dimitri van Hees

- -

Dimitri van Hees
[hidden email]

freshheads grafisch ontwerp en internet applicaties
Dunantstraat 1c | 5017 KC Tilburg | Nederland
tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
[hidden email] | www.freshheads.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

weierophinney
Administrator
-- Dimitri van Hees <[hidden email]> wrote
(on Wednesday, 28 May 2008, 06:01 PM +0200):
> are there any updates concerning this issue? this really is a showstopper for
> me as my online scripts won't work anymore after the update to 1.5.2. therefore
> I have to stick with 1.5.1 on my live environment until this issue has been
> solved. is there a way to bypass this problem?

Did you post an issue, or do I need to?

Also, you can always extend the PartialLoop helper and override the
functionality to do what you need to do _until_ the work is done.


> Matthew Weier O'Phinney wrote:
>
>     -- Matthew Weier O'Phinney <[hidden email]> wrote
>     (on Thursday, 22 May 2008, 10:53 AM -0400):
>
>
>         -- Dimitri van Hees <[hidden email]> wrote
>         (on Thursday, 22 May 2008, 04:42 PM +0200):
>
>
>             So... now how am I supposed to pass my db table rowset to the
>             partialloop? For each partial, I want to use the database relations,
>             for example $this->record-> findDependentRows. This worked fine for me
>             when using
>
>             $this->partialLoop()->setObjectKey('record')->partialLoop('loop.phtml', $rowset);
>
>             Does this change has anything to do with it, or is my server broken
>             since the upgrade to 1.5.2?
>
>
>
>         That should be working, but I'll run some tests to verify; if not, I'll
>         open an issue so we can fix it.
>
>
>
>     I see what's happening.
>
>     PartialLoop checks to see if the model class implements a toArray()
>     method, and, if so, casts the model to an array.
>     Zend_Db_Table_Rowset_Abstract implements a toArray() method, which not
>     only casts the rowset to an array, but all rows it contains -- which
>     means that the ObjectKey is never used.
>
>     This behavior should be changed; if the object is Traversable, we should
>     simply iterate over it.
>
>     Do you have rights to the issue tracker? If so, please post an issue; if
>     not, I will.
>
>
>
>             Matthew Weier O'Phinney wrote:
>
>                 -- Dimitri van Hees <[hidden email]> wrote
>                 (on Thursday, 22 May 2008, 03:07 PM +0200):
>
>
>                     After upgrading to 1.5.2, this functionality doesn't seem to work
>                     anymore for me. I tested my code on a different server (with 1.5.1) and
>                     the same code did work there. Has there been any changes?
>
>
>
>                 The only change for 1.5.2 was to check object type against Traversable
>                 instead of Iterator (which allows more different types of object to be
>                 used with PartialLoop and Partial).
>
>
>
>
>                     Whitcraft, Jon wrote:
>
>
>                         I just noticed that it not in the documentation and I put in a issue
>                         for it in the tracker
>
>
>
>                         http://framework.zend.com/issues/browse/ZF-3307
>
>
>
>
>
>
>
>                         http://www.whitcraftconsulting.com/images/php5_zce_logo.gif
>                         <http://zend.com/zce.php?c=ZEND002524&r=219549271>
>
>
>
>                         Jon Whitcraft
>                         Indianapolis Motor Speedway
>                         [hidden email] <mailto:[hidden email]>
>
>                         Phone: (317) 492-8623 :: Fax: (317) 492-6419
>
>
>
>
>                         *From:* Whitcraft, Jon [mailto:[hidden email]]
>                         *Sent:* Thursday, May 22, 2008 7:26 AM
>                         *To:* Dimitri van Hees; [hidden email]
>                         *Subject:* RE: [fw-mvc] Using an object in Zend_View's PartialLoop helper
>
>
>
>                         That has been there since one of the 1.5.0 RC releases.  I know it was
>                         in the general 1.5.0 release as that is when I started using it full
>                         time.
>
>
>
>                         I just checked the 1.5.2 tag in the repository and the code is in
>                         there for this support.  I have not upgraded to 1.5.2 yet but I'm sure
>                         it's still working.  I will confirm later today and post back to the
>                         list.
>
>
>
>                         http://www.whitcraftconsulting.com/images/php5_zce_logo.gif
>                         <http://zend.com/zce.php?c=ZEND002524&r=219549271>
>
>
>
>                         Jon Whitcraft
>                         Indianapolis Motor Speedway
>                         [hidden email] <mailto:[hidden email]>
>
>                         Phone: (317) 492-8623 :: Fax: (317) 492-6419
>
>
>
>
>                         *From:* Dimitri van Hees [mailto:[hidden email]]
>                         *Sent:* Thursday, May 22, 2008 6:57 AM
>                         *To:* [hidden email]
>                         *Subject:* Re: [fw-mvc] Using an object in Zend_View's PartialLoop helper
>
>
>
>                         is it true this doesn't work anymore since the ZF 1.5.2 release??
>
>                         Christer Edvartsen wrote:
>
>                         Since I didn't find anything about this in the docs I wrote a post
>                         about it.
>
>
>
>
>
>
>
>                         http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/
>
>
>
>                         Someone should update the docs about this. I searched this list and
>                         saw that several others have asked about the same. My post includes a
>                         working example on how to go about calling methods on the object we
>                         want to loop in the PartialLoop helper.
>
>
>
>                         --
>
>
>                         Met vriendelijke groet,
>
>                         Dimitri van Hees
>
>                         - -
>
>                         Dimitri van Hees
>                         [hidden email] <mailto:[hidden email]>
>
>                         *freshheads* grafisch ontwerp en internet applicaties
>                         Dunantstraat 1c | 5017 KC Tilburg | Nederland
>                         tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
>                         [hidden email] <mailto:[hidden email]> | www.freshheads.com
>                         <http://www.freshheads.com>
>
>                         ********************
>
>                         ********************
>
>                         This E-mail (and attachments) may contain confidential/privileged
>                         information intended only for the named addressee(s). If you are not
>                         an intended recipient, do not read, copy, disseminate or take any
>                         action based on the content of this E-mail. Please notify the sender
>                         by reply E-mail and erase this E-mail from your system. Your
>                         assistance is appreciated. E-mail transmission may not be secure or
>                         error-free. The company is not responsible for any loss/damage arising
>                         from any virus transmitted.
>
>                         ********************
>
>                         ********************
>
>
>
>
>                     --
>
>
>                     Met vriendelijke groet,
>
>                     Dimitri van Hees
>
>                     - -
>
>                     Dimitri van Hees
>                     [hidden email]
>
>                     *freshheads* grafisch ontwerp en internet applicaties
>                     Dunantstraat 1c | 5017 KC Tilburg | Nederland
>                     tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
>                     [hidden email] | www.freshheads.com
>
>
>
>
>
>
>
>
>             --
>
>
>             Met vriendelijke groet,
>
>             Dimitri van Hees
>
>             - -
>
>             Dimitri van Hees
>             [hidden email]
>
>             freshheads grafisch ontwerp en internet applicaties
>             Dunantstraat 1c | 5017 KC Tilburg | Nederland
>             tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
>             [hidden email] | www.freshheads.com
>
>
>
>         --
>         Matthew Weier O'Phinney
>         Software Architect       | [hidden email]
>         Zend - The PHP Company   | http://www.zend.com/
>
>
>
>
>
>
>
>
>
> --
>
>
> Met vriendelijke groet,
>
> Dimitri van Hees
>
> - -
>
> Dimitri van Hees
> [hidden email]
>
> freshheads grafisch ontwerp en internet applicaties
> Dunantstraat 1c | 5017 KC Tilburg | Nederland
> tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
> [hidden email] | www.freshheads.com

--
Matthew Weier O'Phinney
Software Architect       | [hidden email]
Zend - The PHP Company   | http://www.zend.com/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using an object in Zend_View's PartialLoop helper

weierophinney
Administrator
-- Matthew Weier O'Phinney <[hidden email]> wrote
(on Wednesday, 28 May 2008, 04:29 PM -0400):
> -- Dimitri van Hees <[hidden email]> wrote
> (on Wednesday, 28 May 2008, 06:01 PM +0200):
> > are there any updates concerning this issue? this really is a showstopper for
> > me as my online scripts won't work anymore after the update to 1.5.2. therefore
> > I have to stick with 1.5.1 on my live environment until this issue has been
> > solved. is there a way to bypass this problem?
>
> Did you post an issue, or do I need to?

Posted:

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


> Also, you can always extend the PartialLoop helper and override the
> functionality to do what you need to do _until_ the work is done.
>
>
> > Matthew Weier O'Phinney wrote:
> >
> >     -- Matthew Weier O'Phinney <[hidden email]> wrote
> >     (on Thursday, 22 May 2008, 10:53 AM -0400):
> >
> >
> >         -- Dimitri van Hees <[hidden email]> wrote
> >         (on Thursday, 22 May 2008, 04:42 PM +0200):
> >
> >
> >             So... now how am I supposed to pass my db table rowset to the
> >             partialloop? For each partial, I want to use the database relations,
> >             for example $this->record-> findDependentRows. This worked fine for me
> >             when using
> >
> >             $this->partialLoop()->setObjectKey('record')->partialLoop('loop.phtml', $rowset);
> >
> >             Does this change has anything to do with it, or is my server broken
> >             since the upgrade to 1.5.2?
> >
> >
> >
> >         That should be working, but I'll run some tests to verify; if not, I'll
> >         open an issue so we can fix it.
> >
> >
> >
> >     I see what's happening.
> >
> >     PartialLoop checks to see if the model class implements a toArray()
> >     method, and, if so, casts the model to an array.
> >     Zend_Db_Table_Rowset_Abstract implements a toArray() method, which not
> >     only casts the rowset to an array, but all rows it contains -- which
> >     means that the ObjectKey is never used.
> >
> >     This behavior should be changed; if the object is Traversable, we should
> >     simply iterate over it.
> >
> >     Do you have rights to the issue tracker? If so, please post an issue; if
> >     not, I will.
> >
> >
> >
> >             Matthew Weier O'Phinney wrote:
> >
> >                 -- Dimitri van Hees <[hidden email]> wrote
> >                 (on Thursday, 22 May 2008, 03:07 PM +0200):
> >
> >
> >                     After upgrading to 1.5.2, this functionality doesn't seem to work
> >                     anymore for me. I tested my code on a different server (with 1.5.1) and
> >                     the same code did work there. Has there been any changes?
> >
> >
> >
> >                 The only change for 1.5.2 was to check object type against Traversable
> >                 instead of Iterator (which allows more different types of object to be
> >                 used with PartialLoop and Partial).
> >
> >
> >
> >
> >                     Whitcraft, Jon wrote:
> >
> >
> >                         I just noticed that it not in the documentation and I put in a issue
> >                         for it in the tracker
> >
> >
> >
> >                         http://framework.zend.com/issues/browse/ZF-3307
> >
> >
> >
> >
> >
> >
> >
> >                         http://www.whitcraftconsulting.com/images/php5_zce_logo.gif
> >                         <http://zend.com/zce.php?c=ZEND002524&r=219549271>
> >
> >
> >
> >                         Jon Whitcraft
> >                         Indianapolis Motor Speedway
> >                         [hidden email] <mailto:[hidden email]>
> >
> >                         Phone: (317) 492-8623 :: Fax: (317) 492-6419
> >
> >
> >
> >
> >                         *From:* Whitcraft, Jon [mailto:[hidden email]]
> >                         *Sent:* Thursday, May 22, 2008 7:26 AM
> >                         *To:* Dimitri van Hees; [hidden email]
> >                         *Subject:* RE: [fw-mvc] Using an object in Zend_View's PartialLoop helper
> >
> >
> >
> >                         That has been there since one of the 1.5.0 RC releases.  I know it was
> >                         in the general 1.5.0 release as that is when I started using it full
> >                         time.
> >
> >
> >
> >                         I just checked the 1.5.2 tag in the repository and the code is in
> >                         there for this support.  I have not upgraded to 1.5.2 yet but I'm sure
> >                         it's still working.  I will confirm later today and post back to the
> >                         list.
> >
> >
> >
> >                         http://www.whitcraftconsulting.com/images/php5_zce_logo.gif
> >                         <http://zend.com/zce.php?c=ZEND002524&r=219549271>
> >
> >
> >
> >                         Jon Whitcraft
> >                         Indianapolis Motor Speedway
> >                         [hidden email] <mailto:[hidden email]>
> >
> >                         Phone: (317) 492-8623 :: Fax: (317) 492-6419
> >
> >
> >
> >
> >                         *From:* Dimitri van Hees [mailto:[hidden email]]
> >                         *Sent:* Thursday, May 22, 2008 6:57 AM
> >                         *To:* [hidden email]
> >                         *Subject:* Re: [fw-mvc] Using an object in Zend_View's PartialLoop helper
> >
> >
> >
> >                         is it true this doesn't work anymore since the ZF 1.5.2 release??
> >
> >                         Christer Edvartsen wrote:
> >
> >                         Since I didn't find anything about this in the docs I wrote a post
> >                         about it.
> >
> >
> >
> >
> >
> >
> >
> >                         http://cogo.wordpress.com/2008/04/25/using-objects-with-zend_views-partialloop-helper/
> >
> >
> >
> >                         Someone should update the docs about this. I searched this list and
> >                         saw that several others have asked about the same. My post includes a
> >                         working example on how to go about calling methods on the object we
> >                         want to loop in the PartialLoop helper.
> >
> >
> >
> >                         --
> >
> >
> >                         Met vriendelijke groet,
> >
> >                         Dimitri van Hees
> >
> >                         - -
> >
> >                         Dimitri van Hees
> >                         [hidden email] <mailto:[hidden email]>
> >
> >                         *freshheads* grafisch ontwerp en internet applicaties
> >                         Dunantstraat 1c | 5017 KC Tilburg | Nederland
> >                         tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
> >                         [hidden email] <mailto:[hidden email]> | www.freshheads.com
> >                         <http://www.freshheads.com>
> >
> >                         ********************
> >
> >                         ********************
> >
> >                         This E-mail (and attachments) may contain confidential/privileged
> >                         information intended only for the named addressee(s). If you are not
> >                         an intended recipient, do not read, copy, disseminate or take any
> >                         action based on the content of this E-mail. Please notify the sender
> >                         by reply E-mail and erase this E-mail from your system. Your
> >                         assistance is appreciated. E-mail transmission may not be secure or
> >                         error-free. The company is not responsible for any loss/damage arising
> >                         from any virus transmitted.
> >
> >                         ********************
> >
> >                         ********************
> >
> >
> >
> >
> >                     --
> >
> >
> >                     Met vriendelijke groet,
> >
> >                     Dimitri van Hees
> >
> >                     - -
> >
> >                     Dimitri van Hees
> >                     [hidden email]
> >
> >                     *freshheads* grafisch ontwerp en internet applicaties
> >                     Dunantstraat 1c | 5017 KC Tilburg | Nederland
> >                     tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
> >                     [hidden email] | www.freshheads.com
> >
> >
> >
> >
> >
> >
> >
> >
> >             --
> >
> >
> >             Met vriendelijke groet,
> >
> >             Dimitri van Hees
> >
> >             - -
> >
> >             Dimitri van Hees
> >             [hidden email]
> >
> >             freshheads grafisch ontwerp en internet applicaties
> >             Dunantstraat 1c | 5017 KC Tilburg | Nederland
> >             tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
> >             [hidden email] | www.freshheads.com
> >
> >
> >
> >         --
> >         Matthew Weier O'Phinney
> >         Software Architect       | [hidden email]
> >         Zend - The PHP Company   | http://www.zend.com/
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> >
> >
> > Met vriendelijke groet,
> >
> > Dimitri van Hees
> >
> > - -
> >
> > Dimitri van Hees
> > [hidden email]
> >
> > freshheads grafisch ontwerp en internet applicaties
> > Dunantstraat 1c | 5017 KC Tilburg | Nederland
> > tel. +31 (0)13 5448761 | fax. +31 (0)13 5448762
> > [hidden email] | www.freshheads.com
>
> --
> Matthew Weier O'Phinney
> Software Architect       | [hidden email]
> Zend - The PHP Company   | http://www.zend.com/
>

--
Matthew Weier O'Phinney
Software Architect       | [hidden email]
Zend - The PHP Company   | http://www.zend.com/
Loading...