I ve read the paragraph about permalinks (hide primary keys and replace them with significant strings) but I can t understand how it works this code:
public function executePermalink($request)
{
$article = ArticlePeer::retrieveBySlug($request->getParameter( slug );
$this->forward404Unless($article); // Display 404 if no article matches slug
$this->article = $article; // Pass the object to the template
}
该法典是推进剂的典型,是否正确? 这与理论一样? 我要写一下检索的BySlug()功能? 你们有了一个例子,我可以理解如何写字?
感谢很多人