3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Event { /** * @var Boolean Whether no further event listeners should be triggered */ private $propagationStopped = false; /** * Returns whether further event listeners should be triggered. * * @see Event::stopPropagation * @return Boolean Whether propagation was already stopped for this event. * * @api */ public function isPropagationStopped() { return $this->propagationStopped; } /** * Stops the propagation of the event to further event listeners. * * If multiple event listeners are connected to the same event, no * further event listener will be triggered once any trigger calls * stopPropagation(). * * @api */ public function stopPropagation() { $this->propagationStopped = true; } } class AddFranchiseeEvent extends Event { /** * Event identifier */ const EVENT_ID = 'gtt.franchisee_my.event.add_franchisee'; /** * New franchisee * * @var Franchisee */ private $franchisee; /** * Franchisee prefix * * @var string */ private $prefix; /** * 1C code * * @var string */ private $code; /** * Franchisee client ID * * @var integer */ private $clientId; /** * Constructor * * @param Franchisee $franchisee new franchisee, must be already stored and have ID * @param string $prefix prefix * @param string $code 1C code * @param int $clientId client ID */ public function __construct(Franchisee $franchisee, $prefix, $code, $clientId) { $this->franchisee = $franchisee; $this->prefix = $prefix; $this->code = $code; $this->clientId = $clientId; } /** * Gets managed franchisee entity * * @return Franchisee */ public function getFranchisee() { return $this->franchisee; } /** * Gets prefix * * @return string */ public function getPrefix() { return $this->prefix; } /** * Gets 1C code * * @return string */ public function getCode() { return $this->code; } /** * Gets franchisee client ID * * @return int */ public function getClientId() { return $this->clientId; } } /** * Class Franchisee * @package Gtt\Module\FranchiseeMy\Entity * * @Map\Entity * * @Map\Table(name="franchisee") */ class Franchisee { /** * ID * * @var int * * @Map\Id * * @Map\Column(name="id", type="integer") * * @Map\GeneratedValue(strategy="AUTO") */ private $id; /** * Parent ID * * @var int * * @Map\Column(name="parent_id", type="integer") */ private $parentId; /** * Short name * * @var string * * @Map\Column(name="short_name", type="string") */ private $shortName; /** * Short name * * @var string * * @Map\Column(name="full_name", type="string") */ private $fullName; /** * Branch ID * * @var int * * @Map\Column(name="branch_id", type="integer") */ private $branchId; /** * Status * * @var int * * @Map\Column(name="status_id", type="integer") */ private $status; /** * Setter * * @param int $status * * @return void */ public function setStatus($status) { $this->status = $status; } /** * Getter * * @return int */ public function getStatus() { return $this->status; } /** * Sets full name * * @param string $fullName */ public function setFullName($fullName) { $this->fullName = $fullName; } /** * Gets full name * * @return string */ public function getFullName() { return $this->fullName; } /** * Sets ID * * @param int $id */ public function setId($id) { $this->id = $id; } /** * Gets ID * * @return int */ public function getId() { return $this->id; } /** * Sets parent ID * * @param int $parentId */ public function setParentId($parentId) { $this->parentId = $parentId; } /** * Gets parent ID * * @return int */ public function getParentId() { return $this->parentId; } /** * Sets short name * * @param string $shortName */ public function setShortName($shortName) { $this->shortName = $shortName; } /** * Gets short name * * @return string */ public function getShortName() { return $this->shortName; } /** * Gets branch ID * * @return int */ public function getBranchId() { return $this->branchId; } /** * Sets branch ID * * @param int $branchId branch ID * * @return void */ public function setBranchId($branchId) { $this->branchId = $branchId; } } $object = new AddFranchiseeEvent(new Franchisee(), 'pref', 121, 12323); echo json_encode($object);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  (null)
number of ops:  14
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  326     0  E >   NEW                                              $1      'AddFranchiseeEvent'
          1        NEW                                              $2      'Franchisee'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $2
          4        SEND_VAL_EX                                              'pref'
          5        SEND_VAL_EX                                              121
          6        SEND_VAL_EX                                              12323
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !0, $1
  328     9        INIT_FCALL                                               'json_encode'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $6      
         12        ECHO                                                     $6
         13      > RETURN                                                   1

Class Event:
Function ispropagationstopped:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  isPropagationStopped
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   FETCH_OBJ_R                                      ~0      'propagationStopped'
          1      > RETURN                                                   ~0
   22     2*     > RETURN                                                   null

End of function ispropagationstopped

Function stoppropagation:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  stopPropagation
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   ASSIGN_OBJ                                               'propagationStopped'
          1        OP_DATA                                                  <true>
   36     2      > RETURN                                                   null

End of function stoppropagation

End of class Event.

Class AddFranchiseeEvent:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  __construct
number of ops:  13
compiled vars:  !0 = $franchisee, !1 = $prefix, !2 = $code, !3 = $clientId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   82     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   84     4        ASSIGN_OBJ                                               'franchisee'
          5        OP_DATA                                                  !0
   85     6        ASSIGN_OBJ                                               'prefix'
          7        OP_DATA                                                  !1
   86     8        ASSIGN_OBJ                                               'code'
          9        OP_DATA                                                  !2
   87    10        ASSIGN_OBJ                                               'clientId'
         11        OP_DATA                                                  !3
   88    12      > RETURN                                                   null

End of function __construct

Function getfranchisee:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  getFranchisee
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   97     0  E >   FETCH_OBJ_R                                      ~0      'franchisee'
          1      > RETURN                                                   ~0
   98     2*     > RETURN                                                   null

End of function getfranchisee

Function getprefix:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  getPrefix
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  107     0  E >   FETCH_OBJ_R                                      ~0      'prefix'
          1      > RETURN                                                   ~0
  108     2*     > RETURN                                                   null

End of function getprefix

Function getcode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  getCode
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  117     0  E >   FETCH_OBJ_R                                      ~0      'code'
          1      > RETURN                                                   ~0
  118     2*     > RETURN                                                   null

End of function getcode

Function getclientid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  getClientId
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  127     0  E >   FETCH_OBJ_R                                      ~0      'clientId'
          1      > RETURN                                                   ~0
  128     2*     > RETURN                                                   null

End of function getclientid

Function ispropagationstopped:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  isPropagationStopped
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   FETCH_OBJ_R                                      ~0      'propagationStopped'
          1      > RETURN                                                   ~0
   22     2*     > RETURN                                                   null

End of function ispropagationstopped

Function stoppropagation:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  stopPropagation
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   ASSIGN_OBJ                                               'propagationStopped'
          1        OP_DATA                                                  <true>
   36     2      > RETURN                                                   null

End of function stoppropagation

End of class AddFranchiseeEvent.

Class Franchisee:
Function setstatus:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  setStatus
number of ops:  4
compiled vars:  !0 = $status
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  208     0  E >   RECV                                             !0      
  210     1        ASSIGN_OBJ                                               'status'
          2        OP_DATA                                                  !0
  211     3      > RETURN                                                   null

End of function setstatus

Function getstatus:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  getStatus
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  220     0  E >   FETCH_OBJ_R                                      ~0      'status'
          1      > RETURN                                                   ~0
  221     2*     > RETURN                                                   null

End of function getstatus

Function setfullname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  setFullName
number of ops:  4
compiled vars:  !0 = $fullName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  228     0  E >   RECV                                             !0      
  230     1        ASSIGN_OBJ                                               'fullName'
          2        OP_DATA                                                  !0
  231     3      > RETURN                                                   null

End of function setfullname

Function getfullname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  getFullName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  240     0  E >   FETCH_OBJ_R                                      ~0      'fullName'
          1      > RETURN                                                   ~0
  241     2*     > RETURN                                                   null

End of function getfullname

Function setid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  setId
number of ops:  4
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  248     0  E >   RECV                                             !0      
  250     1        ASSIGN_OBJ                                               'id'
          2        OP_DATA                                                  !0
  251     3      > RETURN                                                   null

End of function setid

Function getid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  getId
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  260     0  E >   FETCH_OBJ_R                                      ~0      'id'
          1      > RETURN                                                   ~0
  261     2*     > RETURN                                                   null

End of function getid

Function setparentid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  setParentId
number of ops:  4
compiled vars:  !0 = $parentId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  268     0  E >   RECV                                             !0      
  270     1        ASSIGN_OBJ                                               'parentId'
          2        OP_DATA                                                  !0
  271     3      > RETURN                                                   null

End of function setparentid

Function getparentid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  getParentId
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  280     0  E >   FETCH_OBJ_R                                      ~0      'parentId'
          1      > RETURN                                                   ~0
  281     2*     > RETURN                                                   null

End of function getparentid

Function setshortname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  setShortName
number of ops:  4
compiled vars:  !0 = $shortName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  288     0  E >   RECV                                             !0      
  290     1        ASSIGN_OBJ                                               'shortName'
          2        OP_DATA                                                  !0
  291     3      > RETURN                                                   null

End of function setshortname

Function getshortname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  getShortName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  300     0  E >   FETCH_OBJ_R                                      ~0      'shortName'
          1      > RETURN                                                   ~0
  301     2*     > RETURN                                                   null

End of function getshortname

Function getbranchid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  getBranchId
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  310     0  E >   FETCH_OBJ_R                                      ~0      'branchId'
          1      > RETURN                                                   ~0
  311     2*     > RETURN                                                   null

End of function getbranchid

Function setbranchid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0HSi
function name:  setBranchId
number of ops:  4
compiled vars:  !0 = $branchId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  320     0  E >   RECV                                             !0      
  322     1        ASSIGN_OBJ                                               'branchId'
          2        OP_DATA                                                  !0
  323     3      > RETURN                                                   null

End of function setbranchid

End of class Franchisee.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.15 ms | 1412 KiB | 15 Q