<?php
class Event
{
private $propagationStopped = false;
public function isPropagationStopped()
{
return $this->propagationStopped;
}
public function stopPropagation()
{
$this->propagationStopped = true;
}
}
class AddFranchiseeEvent extends Event
{
const EVENT_ID = 'gtt.franchisee_my.event.add_franchisee';
private $franchisee;
private $prefix;
private $code;
private $clientId;
public function __construct(Franchisee $franchisee, $prefix, $code, $clientId)
{
$this->franchisee = $franchisee;
$this->prefix = $prefix;
$this->code = $code;
$this->clientId = $clientId;
}
public function getFranchisee()
{
return $this->franchisee;
}
public function getPrefix()
{
return $this->prefix;
}
public function getCode()
{
return $this->code;
}
public function getClientId()
{
return $this->clientId;
}
}
class Franchisee
{
private $id;
private $parentId;
private $shortName;
private $fullName;
private $branchId;
private $status;
public function setStatus($status)
{
$this->status = $status;
}
public function getStatus()
{
return $this->status;
}
public function setFullName($fullName)
{
$this->fullName = $fullName;
}
public function getFullName()
{
return $this->fullName;
}
public function setId($id)
{
$this->id = $id;
}
public function getId()
{
return $this->id;
}
public function setParentId($parentId)
{
$this->parentId = $parentId;
}
public function getParentId()
{
return $this->parentId;
}
public function setShortName($shortName)
{
$this->shortName = $shortName;
}
public function getShortName()
{
return $this->shortName;
}
public function getBranchId()
{
return $this->branchId;
}
public function setBranchId($branchId)
{
$this->branchId = $branchId;
}
}
$object = new AddFranchiseeEvent(new Franchisee(), 'pref', 121, 12323);
echo json_encode($object);
Fatal error: Call to undefined function json_encode() in /in/gOBKM on line 157
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/gOBKM on line 4
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/gOBKM on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/gOBKM on line 4
Process exited with code 255.