3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Document; use RepositoryAbstract; use Database; use ORM\DocumentCategory as Model; use ProxyHelper; class TagRepository extends RepositoryAbstract { use ProxyHelper; public function __construct(Database $db, Model $model) { $this->model = $model; parent::__construct($db); } public function newInstance(array $data = array()) { $tag = new Tag; $tag = $this->automap($data, $tag); $client = $this->repositoryProxy($data, 'client', 'Client\ClientRepository', 'clients_id'); $tag->setClient($client); return $tag; } public function read($id) { $tag = $this->model ->with('client') ->find($id); return $this->newInstance($tag->toArray()); } public function readAll($where = false) { $query = $this->model ->with('client') ->orderBy('name'); if ($where) { $query->whereRaw($where); } $tags = $query->get(); return $this->newCollection($tags); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GdK5a
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'document%5Ctagrepository', 'repositoryabstract'
   54     1      > RETURN                                                   1

Class Document\TagRepository:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GdK5a
function name:  __construct
number of ops:  8
compiled vars:  !0 = $db, !1 = $model
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        ASSIGN_OBJ                                               'model'
          3        OP_DATA                                                  !1
   15     4        INIT_STATIC_METHOD_CALL                                  
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   16     7      > RETURN                                                   null

End of function __construct

Function newinstance:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GdK5a
function name:  newInstance
number of ops:  21
compiled vars:  !0 = $data, !1 = $tag, !2 = $client
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV_INIT                                        !0      <array>
   20     1        NEW                                              $3      'Document%5CTag'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   22     4        INIT_METHOD_CALL                                         'automap'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $6      
          8        ASSIGN                                                   !1, $6
   24     9        INIT_METHOD_CALL                                         'repositoryProxy'
         10        SEND_VAR_EX                                              !0
         11        SEND_VAL_EX                                              'client'
         12        SEND_VAL_EX                                              'Client%5CClientRepository'
         13        SEND_VAL_EX                                              'clients_id'
         14        DO_FCALL                                      0  $8      
         15        ASSIGN                                                   !2, $8
   25    16        INIT_METHOD_CALL                                         !1, 'setClient'
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0          
   27    19      > RETURN                                                   !1
   28    20*     > RETURN                                                   null

End of function newinstance

Function read:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GdK5a
function name:  read
number of ops:  16
compiled vars:  !0 = $id, !1 = $tag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   RECV                                             !0      
   32     1        FETCH_OBJ_R                                      ~2      'model'
   33     2        INIT_METHOD_CALL                                         ~2, 'with'
          3        SEND_VAL_EX                                              'client'
          4        DO_FCALL                                      0  $3      
   34     5        INIT_METHOD_CALL                                         $3, 'find'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $4      
   32     8        ASSIGN                                                   !1, $4
   36     9        INIT_METHOD_CALL                                         'newInstance'
         10        INIT_METHOD_CALL                                         !1, 'toArray'
         11        DO_FCALL                                      0  $6      
         12        SEND_VAR_NO_REF_EX                                       $6
         13        DO_FCALL                                      0  $7      
         14      > RETURN                                                   $7
   37    15*     > RETURN                                                   null

End of function read

Function readall:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/GdK5a
function name:  readAll
number of ops:  21
compiled vars:  !0 = $where, !1 = $query, !2 = $tags
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   RECV_INIT                                        !0      <false>
   41     1        FETCH_OBJ_R                                      ~3      'model'
   42     2        INIT_METHOD_CALL                                         ~3, 'with'
          3        SEND_VAL_EX                                              'client'
          4        DO_FCALL                                      0  $4      
   43     5        INIT_METHOD_CALL                                         $4, 'orderBy'
          6        SEND_VAL_EX                                              'name'
          7        DO_FCALL                                      0  $5      
   41     8        ASSIGN                                                   !1, $5
   45     9      > JMPZ                                                     !0, ->13
   47    10    >   INIT_METHOD_CALL                                         !1, 'whereRaw'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0          
   50    13    >   INIT_METHOD_CALL                                         !1, 'get'
         14        DO_FCALL                                      0  $8      
         15        ASSIGN                                                   !2, $8
   52    16        INIT_METHOD_CALL                                         'newCollection'
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0  $10     
         19      > RETURN                                                   $10
   53    20*     > RETURN                                                   null

End of function readall

End of class Document\TagRepository.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.69 ms | 1403 KiB | 13 Q