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

class Core_Model_DbTable_Locations extends Engine_Db_Table {

  protected $_name = 'core_locations';
  protected $_rowClass = 'Core_Model_Location';

  public function getLocationData($params = array()) {
    $name = $this->info('name');
    $select = $this->select()
            ->from($name)
            ->where('resource_id = ?', $params['resource_id'])
            ->where('resource_type = ?', $params['resource_type']);
    return $this->fetchRow($select);
  }
}
