Listing 11.1. | |
| ROZDZIAŁ: | 11. Relacje 1:n |
| TXT: | listing-11-01.txt |
<?php
class kontynent extends Basekontynent
{
public function get($prop)
{
if ($prop == 'panstwoes') {
return
Doctrine_Query::create()
->from('Panstwo p')
->where('p.kontynent_id = ?', $this['kontynent_id'])
->orderBy('p.nazwa')
->fetchArray();
} else {
return parent::get($prop);
}
}
}