<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/

class Comment_Model_DbTable_Emotionfiles extends Engine_Db_Table
{
  protected $_rowClass = 'Comment_Model_Files';
  public function getPaginator($params = array())
  {
    return Zend_Paginator::factory($this->getFiles($params));
  }
  public function getFiles($params = array())
  {
    $select = ($this->select());
    if (!empty($params['limit'])) {
      $select->limit($params['limit']);
    }
    $select->where('gallery_id =?', $params['gallery_id']);
    if (!empty($params['fetchAll'])) {
      return $this->fetchAll($select);
    }
    return $select;
  }
}
