Skip to content

Instantly share code, notes, and snippets.

@RWOverdijk
Created August 16, 2012 21:33
Show Gist options
  • Save RWOverdijk/3373816 to your computer and use it in GitHub Desktop.
Save RWOverdijk/3373816 to your computer and use it in GitHub Desktop.
<?php
namespace Cms\Mapper;
use ZfcBase\Mapper\AbstractDbMapper;
class Slug extends AbstractDbMapper implements DbAdapterAwareInterface
{
protected $tableName = 'slugs';
public function findBySlug($slug)
{
$select = $this->select()
->from($this->tableName)
->where(array('slug' => $slug));
$entity = $this->selectWith($select)->current();
// $this->getEventManager()->trigger('find', $this, array('entity' => $entity));
return $entity;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment