<?php
/*
* @package LabCMS
* @copyright (c) 2006 Alexander Levin aka Loki (loki_angel@mail.ru)
* @support http://labcms.ru
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/

class bug_tracker_version_entity extends Entity
{
	public function __construct($data)
	{
		$this->_data['id']=&$this->_data['version_id'];
		parent::__construct($data);
	}

	public function hasItems()
	{
		if (!isset($this->has_items)) return $this->has_items;
		$mapper=Factory::create('bug_tracker.mapper');
		$hasItems=isVersionsHasItems(array($this->id));
		return isset($hasItems[$this->id]);
	}
}