Question about PartialLoop() usage

6 messages Options
Embed this post
Permalink
jwhitcraft

Question about PartialLoop() usage

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

I have a model that implements SeekableIterator and Countable so I can use it like an array

 

 

When I do a foreach($designs as $design) {} loop I get back the proper value in $design which is an object model containing all the info about a design..but when I do this

 

<?= $this->partialLoop('view/design.phtml', $this->designs); ?>

 

I don’t have any way to access it.  am I doing something wrong or can objects not be used?

 

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

Jon Whitcraft
Indianapolis Motor Speedway
[hidden email]

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


 

********************
********************
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.
********************
********************

Eric Coleman-3

Re: Question about PartialLoop() usage

Reply Threaded More More options
Print post
Permalink
partial/partialLoop eat the object with standard behaviour :/

This is something I talked to Matthew about, and he asked me a while  
ago to post to the list asking opinions.

Here's the question:  when you pass an actual physical object instead  
of an array, how do you know what to name this variable in the view...

Regards,
Eric

On Jan 10, 2008, at 12:27 PM, Whitcraft, Jon wrote:

> I have a model that implements SeekableIterator and Countable so I  
> can use it like an array
>
>
> When I do a foreach($designs as $design) {} loop I get back the  
> proper value in $design which is an object model containing all the  
> info about a design..but when I do this
>
> <?= $this->partialLoop('view/design.phtml', $this->designs); ?>
>
> I don’t have any way to access it.  am I doing something wrong or  
> can objects not be used?
>
> <image001.gif>
> Jon Whitcraft
> Indianapolis Motor Speedway
> [hidden email]
> Phone: (317) 492-8623 :: Fax: (317) 492-6419
>
>
> ********************
> ********************
> 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.
> ********************
> ********************

jwhitcraft

RE: Question about PartialLoop() usage

Reply Threaded More More options
Print post
Permalink
Did you read my second email?  I just assigned the object to the name of
'object' which I can then access from the view.

Another solution would be to have it read in the object's name and use
that as the name inside of the view.

Jon Whitcraft
Indianapolis Motor Speedway
[hidden email]
Phone: (317) 492-8623 :: Fax: (317) 492-6419



-----Original Message-----
From: Eric Coleman [mailto:[hidden email]]
Sent: Thursday, January 10, 2008 2:07 PM
To: Whitcraft, Jon
Cc: [hidden email]
Subject: Re: [fw-mvc] Question about PartialLoop() usage

partial/partialLoop eat the object with standard behaviour :/

This is something I talked to Matthew about, and he asked me a while  
ago to post to the list asking opinions.

Here's the question:  when you pass an actual physical object instead  
of an array, how do you know what to name this variable in the view...

Regards,
Eric

On Jan 10, 2008, at 12:27 PM, Whitcraft, Jon wrote:

> I have a model that implements SeekableIterator and Countable so I  
> can use it like an array
>
>
> When I do a foreach($designs as $design) {} loop I get back the  
> proper value in $design which is an object model containing all the  
> info about a design..but when I do this
>
> <?= $this->partialLoop('view/design.phtml', $this->designs); ?>
>
> I don't have any way to access it.  am I doing something wrong or  
> can objects not be used?
>
> <image001.gif>
> Jon Whitcraft
> Indianapolis Motor Speedway
> [hidden email]
> Phone: (317) 492-8623 :: Fax: (317) 492-6419
>
>
> ********************
> ********************
> 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.
> ********************
> ********************

Eric Coleman-3

Re: Question about PartialLoop() usage

Reply Threaded More More options
Print post
Permalink

On Jan 10, 2008, at 2:54 PM, Whitcraft, Jon wrote:

> Did you read my second email?  I just assigned the object to the  
> name of
> 'object' which I can then access from the view.
>
> Another solution would be to have it read in the object's name and use
> that as the name inside of the view.

I actually didn't seem to get this one :-d  I too, have thought of  
using 'object' to pass objects, but I'm not so sure Matthew like that  
idea....
jwhitcraft

RE: Question about PartialLoop() usage

Reply Threaded More More options
Print post
Permalink
I agree it's not a final solution but I needed something so I could pass
objects.

Matthew what do you think?

Jon Whitcraft
Indianapolis Motor Speedway
[hidden email]
Phone: (317) 492-8623 :: Fax: (317) 492-6419




-----Original Message-----
From: Eric Coleman [mailto:[hidden email]]
Sent: Thursday, January 10, 2008 3:26 PM
To: Whitcraft, Jon
Cc: [hidden email]
Subject: Re: [fw-mvc] Question about PartialLoop() usage


On Jan 10, 2008, at 2:54 PM, Whitcraft, Jon wrote:

> Did you read my second email?  I just assigned the object to the  
> name of
> 'object' which I can then access from the view.
>
> Another solution would be to have it read in the object's name and use
> that as the name inside of the view.

I actually didn't seem to get this one :-d  I too, have thought of  
using 'object' to pass objects, but I'm not so sure Matthew like that  
idea....
********************
********************
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.
********************
********************
jwhitcraft

RE: Question about PartialLoop() usage

Reply Threaded More More options
Print post
Permalink
I have created an issue for this so it doesn't get lost.

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


Jon Whitcraft
Indianapolis Motor Speedway
[hidden email]
Phone: (317) 492-8623 :: Fax: (317) 492-6419



-----Original Message-----
From: Whitcraft, Jon [mailto:[hidden email]]
Sent: Thursday, January 10, 2008 4:18 PM
To: Eric Coleman
Cc: [hidden email]
Subject: RE: [fw-mvc] Question about PartialLoop() usage

I agree it's not a final solution but I needed something so I could pass
objects.

Matthew what do you think?

Jon Whitcraft
Indianapolis Motor Speedway
[hidden email]
Phone: (317) 492-8623 :: Fax: (317) 492-6419




-----Original Message-----
From: Eric Coleman [mailto:[hidden email]]
Sent: Thursday, January 10, 2008 3:26 PM
To: Whitcraft, Jon
Cc: [hidden email]
Subject: Re: [fw-mvc] Question about PartialLoop() usage


On Jan 10, 2008, at 2:54 PM, Whitcraft, Jon wrote:

> Did you read my second email?  I just assigned the object to the  
> name of
> 'object' which I can then access from the view.
>
> Another solution would be to have it read in the object's name and use
> that as the name inside of the view.

I actually didn't seem to get this one :-d  I too, have thought of  
using 'object' to pass objects, but I'm not so sure Matthew like that  
idea....
********************
********************
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.
********************
********************