<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
class Core_Model_Report extends Core_Model_Item_Abstract
{
  protected $_searchTriggers = false;

  public function getSubject()
  {
    if( empty($this->subject_type) || empty($this->subject_id) ) {
      return null;
    }

    try {
      $subject = Engine_Api::_()->getItem($this->subject_type, $this->subject_id);
    } catch( Exception $e ) {
      return null;
    }

    if( !($subject instanceof Core_Model_Item_Abstract) ) {
      return null;
    }

    return $subject;
  }
}
