On 12-05-2009 at 14:26:14 Szymon Przybył <apocalyp...@gmail.com> wrote:

> I checked, and isset($team->players) return false.

Then it's problem with the framework. If it tells PHPTAL that $team->players is 
not set, then PHPTAL won't try to read it.

> I find __isset() method in ORM class:
>
>     /**
>      * Checks if object data is set.
>      *
>      * @param   string  column name
>      * @return  boolean
>      */
>     public function __isset($column)
>     {
>         return (isset($this->object[$column]) OR  
> isset($this->related[$column]));
>     }
>
> And there is also huge __get() method :-)
>
> I must change something in ORM or PHPTAL, to let working team/players?

Change ORM's __isset() to return true for all properties that can be read.


Alternatively, if you can subclass Team, do something like this:

class Team extends ORM
{
 function players() {return $this->players;}
}


(PHPTAL looks for methods first)

-- 
regards, Kornel

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to