Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Commit

Permalink
Update AlbumTable to use the reworked AbstractTableGateway
Browse files Browse the repository at this point in the history
  • Loading branch information
akrabat committed May 23, 2012
1 parent d03b142 commit d8e89bf
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions module/Album/src/Album/Model/AlbumTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@

namespace Album\Model;

use Zend\Db\TableGateway\TableGateway,
use Zend\Db\TableGateway\AbstractTableGateway,
Zend\Db\Adapter\Adapter,
Zend\Db\ResultSet\ResultSet;

class AlbumTable extends TableGateway
class AlbumTable extends AbstractTableGateway
{
public function __construct(Adapter $adapter = null, $databaseSchema = null,
ResultSet $selectResultPrototype = null)
protected $table ='album';
protected $tableName ='album';

public function __construct(Adapter $adapter)
{
parent::__construct('album', $adapter, $databaseSchema,
$selectResultPrototype);
$this->adapter = $adapter;
$this->resultSetPrototype = new ResultSet(new Album);

$resultSetPrototype = $this->getSelectResultPrototype();
$resultSetPrototype->setRowObjectPrototype(new Album);
$this->initialize();
}

public function fetchAll()
Expand Down Expand Up @@ -54,7 +55,6 @@ public function saveAlbum(Album $album)
}
}


public function addAlbum($artist, $title)
{
$data = array(
Expand Down

0 comments on commit d8e89bf

Please sign in to comment.