Listing 10.11. | |
| ROZDZIAŁ: | 10. Wybieranie pojedynczego rekordu |
| TXT: | listing-10-11.txt |
public function execute_show()
{
if (
isset($_GET['slug']) &&
str_ivslug($_GET['slug']) &&
($tren = Doctrine::getTable('Tren')->findOneBySlug($_GET['slug']))
) {
$this->set('tren', $tren);
} else {
$this->execute_404();
}
}