args = new \Doctrine\Common\Collections\ArrayCollection();
$this->processed = 1;
}
public function getId()
{
return $this->id;
}
public function setId($id)
{
$this->id = $id;
}
public function getDate()
{
return $this->date;
}
public function setDate($date)
{
$this->date = $date;
}
public function getFromUsr()
{
return $this->fromUsr;
}
public function setFromUsr($fromUsr)
{
$this->fromUsr = $fromUsr;
}
public function getToUsr()
{
return $this->toUsr;
}
public function setToUsr($toUsr)
{
$this->toUsr = $toUsr;
}
public function getSubject()
{
return $this->subject;
}
public function setSubject($subject)
{
$this->subject = $subject;
}
public function getText()
{
return $this->text;
}
public function setText($text)
{
$this->text = $text;
}
public function getArgs()
{
return $this->args;
}
public function setArgs($args)
{
$this->args = $args;
}
public function getSession()
{
return $this->session;
}
public function setSession(\Srovnavac\Models\Entities\Session $session)
{
$this->session = $session;
}
public function getUsers()
{
return ToolSuite::getSubCollection(Application::getLoggedUsers(), 'Username', 'Username');
}
public function jsonSerialize()
{
$getters = get_class_methods($this);
$result = array();
foreach ($getters as $getter)
{
if (strpos($getter, "get") === 0)
{
$propName = str_replace("get", "", $getter);
$propName{0} = strtolower($propName{0});
// $result[$propName] = json_encode($this->$getter(),JSON_UNESCAPED_UNICODE);
if ($propName == "args")
$result[$propName] = $this->$getter()->toArray();
else
$result[$propName] = $this->$getter();
}
}
return $result;
}
public function getProcessed()
{
return $this->processed;
}
public function setProcessed($processed)
{
$this->processed = $processed;
}
}