[PHPTAL] team/players doesn't work,
php:team.players works - Kohana's ORM
Szymon Przybył
apocalyptiq at gmail.com
Tue May 12 14:37:17 CEST 2009
Hi!
I'm using PHPTAL integrated with Kohana Frameworka (instead of default
View class).
In Kohana there is an Object Relational Mapping (ORM) - models of each
table in our database. It works like this:
$team = ORM::factory('team', 1) // it loads team with id = 1 from a database
$players = $team->players // it get all players from players table with
team_id = 1
Now, when I set team object in phptal:
$tal->team = $team;
In templates team/players doesn't works, but php:team.players works.
When I call players from team object before set it in phptal:
$team->players;
$tal->team = $team;
team/players works in templates... Why it doesn't works without calling
previously $team->players?
cheers!
szymek
More information about the PHPTAL
mailing list