3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Controller used to manage specificites * * Generated using AdminGen, Copyright Conception Focus 2012 * @author korri */ class Specificites extends CI_Controller { public function __construct() { parent::__construct(); requireRight('gestion_' . 'specificites'); } /** * List all specificites * @return null */ public function index() { $specificites = new Specificite(); $data['specificites'] = $specificites->get_iterated(); $this->smartyparser->parse('specificites/listing.tpl', $data); } /** * Internal, used by add and edit to render edition form * * @param Specificite|boolean $specificite Currently edited specificite * * @return null */ public function _edit($specificite = false) { if (!$specificite) { $specificite = new Specificite(); } $data['specificite'] = $specificite; $this->smartyparser->parse('specificites/edit.tpl', $data); } /** * Edit an existing specificite * * @param int $id Id of the edited specificite * * @return null */ public function edit($id) { $specificite = new Specificite($id); if (!$specificite->exists()) { show_404(); } $this->_edit($specificite); } /** * Add a specificite * @return null */ public function add() { $this->_edit(); } /** * Post page, used to receive data from the form */ public function post() { if (!$this->input->post()) { show_404(); } if ($this->input->post('id')) { $specificite = new Specificite((int)$this->input->post('id')); if (!$specificite->exists()) { show_404(); } } else { $specificite = new Specificite(); } $post = $this->input->post(); $specificite->from_array($post); if ($specificite->save()) { $this->session->set_flashdata('success', 'Le/La specificite à bien été enregistré(e).'); redirect('specificites'); } $this->_edit($specificite); } public function delete($id) { $specificite = new Specificite($id); if (!$specificite->exists()) { show_404(); } else { $specificite->delete(); $this->session->set_flashdata('success', 'Le/La specificite à bien été supprimé'); } redirect('specificites'); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Of7XB
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'specificites', 'ci_controller'
  111     1      > RETURN                                                   1

Class Specificites:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Of7XB
function name:  __construct
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
   15     2        INIT_FCALL_BY_NAME                                       'requireRight'
          3        SEND_VAL_EX                                              'gestion_specificites'
          4        DO_FCALL                                      0          
   16     5      > RETURN                                                   null

End of function __construct

Function index:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Of7XB
function name:  index
number of ops:  13
compiled vars:  !0 = $specificites, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $2      'Specificite'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   25     3        INIT_METHOD_CALL                                         !0, 'get_iterated'
          4        DO_FCALL                                      0  $6      
          5        ASSIGN_DIM                                               !1, 'specificites'
          6        OP_DATA                                                  $6
   26     7        FETCH_OBJ_R                                      ~7      'smartyparser'
          8        INIT_METHOD_CALL                                         ~7, 'parse'
          9        SEND_VAL_EX                                              'specificites%2Flisting.tpl'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
   27    12      > RETURN                                                   null

End of function index

Function _edit:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/Of7XB
function name:  _edit
number of ops:  14
compiled vars:  !0 = $specificite, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   RECV_INIT                                        !0      <false>
   38     1        BOOL_NOT                                         ~2      !0
          2      > JMPZ                                                     ~2, ->6
   39     3    >   NEW                                              $3      'Specificite'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
   41     6    >   ASSIGN_DIM                                               !1, 'specificite'
          7        OP_DATA                                                  !0
   43     8        FETCH_OBJ_R                                      ~7      'smartyparser'
          9        INIT_METHOD_CALL                                         ~7, 'parse'
         10        SEND_VAL_EX                                              'specificites%2Fedit.tpl'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0          
   44    13      > RETURN                                                   null

End of function _edit

Function edit:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/Of7XB
function name:  edit
number of ops:  15
compiled vars:  !0 = $id, !1 = $specificite
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   53     0  E >   RECV                                             !0      
   55     1        NEW                                              $2      'Specificite'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $2
   56     5        INIT_METHOD_CALL                                         !1, 'exists'
          6        DO_FCALL                                      0  $5      
          7        BOOL_NOT                                         ~6      $5
          8      > JMPZ                                                     ~6, ->11
   57     9    >   INIT_FCALL_BY_NAME                                       'show_404'
         10        DO_FCALL                                      0          
   59    11    >   INIT_METHOD_CALL                                         '_edit'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
   60    14      > RETURN                                                   null

End of function edit

Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Of7XB
function name:  add
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   68     0  E >   INIT_METHOD_CALL                                         '_edit'
          1        DO_FCALL                                      0          
   69     2      > RETURN                                                   null

End of function add

Function post:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 28
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 49
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
Branch analysis from position: 27
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 49
Branch analysis from position: 41
Branch analysis from position: 49
Branch analysis from position: 7
filename:       /in/Of7XB
function name:  post
number of ops:  53
compiled vars:  !0 = $specificite, !1 = $post
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   76     0  E >   FETCH_OBJ_R                                      ~2      'input'
          1        INIT_METHOD_CALL                                         ~2, 'post'
          2        DO_FCALL                                      0  $3      
          3        BOOL_NOT                                         ~4      $3
          4      > JMPZ                                                     ~4, ->7
   77     5    >   INIT_FCALL_BY_NAME                                       'show_404'
          6        DO_FCALL                                      0          
   80     7    >   FETCH_OBJ_R                                      ~6      'input'
          8        INIT_METHOD_CALL                                         ~6, 'post'
          9        SEND_VAL_EX                                              'id'
         10        DO_FCALL                                      0  $7      
         11      > JMPZ                                                     $7, ->28
   81    12    >   NEW                                              $8      'Specificite'
         13        FETCH_OBJ_R                                      ~9      'input'
         14        INIT_METHOD_CALL                                         ~9, 'post'
         15        SEND_VAL_EX                                              'id'
         16        DO_FCALL                                      0  $10     
         17        CAST                                          4  ~11     $10
         18        SEND_VAL_EX                                              ~11
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !0, $8
   82    21        INIT_METHOD_CALL                                         !0, 'exists'
         22        DO_FCALL                                      0  $14     
         23        BOOL_NOT                                         ~15     $14
         24      > JMPZ                                                     ~15, ->27
   83    25    >   INIT_FCALL_BY_NAME                                       'show_404'
         26        DO_FCALL                                      0          
         27    > > JMP                                                      ->31
   86    28    >   NEW                                              $17     'Specificite'
         29        DO_FCALL                                      0          
         30        ASSIGN                                                   !0, $17
   88    31    >   FETCH_OBJ_R                                      ~20     'input'
         32        INIT_METHOD_CALL                                         ~20, 'post'
         33        DO_FCALL                                      0  $21     
         34        ASSIGN                                                   !1, $21
   89    35        INIT_METHOD_CALL                                         !0, 'from_array'
         36        SEND_VAR_EX                                              !1
         37        DO_FCALL                                      0          
   92    38        INIT_METHOD_CALL                                         !0, 'save'
         39        DO_FCALL                                      0  $24     
         40      > JMPZ                                                     $24, ->49
   93    41    >   FETCH_OBJ_R                                      ~25     'session'
         42        INIT_METHOD_CALL                                         ~25, 'set_flashdata'
         43        SEND_VAL_EX                                              'success'
         44        SEND_VAL_EX                                              'Le%2FLa+specificite+%C3%A0+bien+%C3%A9t%C3%A9+enregistr%C3%A9%28e%29.'
         45        DO_FCALL                                      0          
   94    46        INIT_FCALL_BY_NAME                                       'redirect'
         47        SEND_VAL_EX                                              'specificites'
         48        DO_FCALL                                      0          
   96    49    >   INIT_METHOD_CALL                                         '_edit'
         50        SEND_VAR_EX                                              !0
         51        DO_FCALL                                      0          
   97    52      > RETURN                                                   null

End of function post

Function delete:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Of7XB
function name:  delete
number of ops:  23
compiled vars:  !0 = $id, !1 = $specificite
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   99     0  E >   RECV                                             !0      
  101     1        NEW                                              $2      'Specificite'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $2
  103     5        INIT_METHOD_CALL                                         !1, 'exists'
          6        DO_FCALL                                      0  $5      
          7        BOOL_NOT                                         ~6      $5
          8      > JMPZ                                                     ~6, ->12
  104     9    >   INIT_FCALL_BY_NAME                                       'show_404'
         10        DO_FCALL                                      0          
         11      > JMP                                                      ->19
  106    12    >   INIT_METHOD_CALL                                         !1, 'delete'
         13        DO_FCALL                                      0          
  107    14        FETCH_OBJ_R                                      ~9      'session'
         15        INIT_METHOD_CALL                                         ~9, 'set_flashdata'
         16        SEND_VAL_EX                                              'success'
         17        SEND_VAL_EX                                              'Le%2FLa+specificite+%C3%A0+bien+%C3%A9t%C3%A9+supprim%C3%A9'
         18        DO_FCALL                                      0          
  109    19    >   INIT_FCALL_BY_NAME                                       'redirect'
         20        SEND_VAL_EX                                              'specificites'
         21        DO_FCALL                                      0          
  110    22      > RETURN                                                   null

End of function delete

End of class Specificites.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.36 ms | 1411 KiB | 13 Q