3v4l.org

run code in 300+ PHP versions simultaneously
<?php use Tonic\Resource, Tonic\Response, Tonic\ConditionException; /** * Class to add, update and remove Meals * @uri /eatLogs/logs/{date}/meals */ class EatLogMeals extends EatLogs { /* { "id":1, "servings":2, "mealoccasion_id":4, "is_eat_out":true } */ /** * Add new Meal - return the whole eat log (/eatLogs/logs/{date}/meals) * @method POST * @provides application/json * @secure basic * @return Response */ function addEatLogMeal() { global $app; $user = $this->getUser(); //check if date is in correct format yyyyMMdd $this->date = $this->validateDate($this->date); //TODO validate other input //find a plan for current user $plan = $user->getPlan(); if(!$plan || !$plan->id) { throw new Tonic\NotFoundException('EatLogMeal couldn\'t be created. Plan for current user not found'); } $eatLog = R::findOne('eatlog', ' plan_id = ? AND log_date = ?', array($plan->id, $this->date)); //eatlog exists? if (!$eatLog || !$eatLog->id) { //create a EatLog entry $eatLog = $this->createEatLog($plan); } //meal exists? $meal = R::load('meal', $this->request->data['id']); if (!$meal || !$meal->id) { throw new Tonic\NotFoundException('EatLogMeal couldn\'t be created. Meal with id ' . $this->request->data['id'] . ' not found.'); } //meal occasion exists? $mealOccasion = R::load('mealoccasion', $this->request->data['mealoccasion_id']); if (!$mealOccasion || !$mealOccasion->id) { throw new Tonic\NotFoundException('EatLogMeal couldn\'t be created. Meal occasion with id ' . $this->request->data['mealoccasion_id'] . ' not found.'); } if ($this->request->data['servings'] > 0) { //insert EatLogMeals - as many as servings argument $items = array(); /* if ($this->request->data->servings > 1) { $items = R::dispense('eatlogmeal', $this->request->data->servings); } else { $items[0] = R::dispense('eatlogmeal'); } */ for ($i = 0; $i < $this->request->data['servings']; $i++) { $item = R::dispense('eatlogmeal'); $item->eatlog = $eatLog; $item->meal = $meal; $item->mealoccasion = $mealOccasion; $item->is_eat_out = (bool) $this->request->data['is_eat_out']; $eatLogMealId = R::store($item); //add EatLogItems for this Meal $mealImpactGroup = R::find('mealimpactgroup', ' meal_id = :meal_id', array(':meal_id' => $meal->id)); foreach ($mealImpactGroup as $mIG) { //insert EatLogItems - as many as servings argument $items2 = array(); if ($mIG->servings > 1) { $items2 = R::dispense('eatlogitem', $mIG->servings); } else { $items2[0] = R::dispense('eatlogitem'); } for ($j = 0; $j < $mIG->servings; $j++) { $items2[$j]->eatlog = $eatLog; $items2[$j]->eatimpactgroup_id = $mIG->eatimpactgroup_id; $items2[$j]->mealoccasion = $mealOccasion; $items2[$j]->is_eat_out = $this->request->data['is_eat_out']; $items2[$j]->eatlogmeal = $item; } R::storeAll($items2); } } //R::storeAll($items); } //calculate total impact factor $this->calculateTotalImpactFactor($eatLog, $plan->program_id); return $this->listEatLog(); } /** * Remove EatLogMeal(s) (/eatLogs/logs/{date}/meals) - return the whole eat log * @method DELETE * @provides application/json * @secure basic * @return Response */ function removeEatLogMeals() { $user = $this->getUser(); //check if date is in correct format yyyyMMdd $this->date = $this->validateDate($this->date); //TODO validate other input //find a plan for current user $plan = $user->getPlan(); if(!$plan || !$plan->id) { throw new Tonic\NotFoundException('EatLog couldn\'t be created. Plan for current user not found'); } $eatLog = R::findOne('eatlog', ' plan_id = ? AND log_date = ?', array($plan->id, $this->date)); //eatlog exists? if (!$eatLog || !$eatLog->id) { //create a EatLog entry $eatLog = $this->createEatLog($plan); } if ($this->request->data['servings'] > 0) { //TODO check whether there are actually those eatlogmeals? R::exec("DELETE FROM eatlogmeal WHERE eatlog_id = :eatlog_id AND meal_id = :meal_id AND mealoccasion_id = :mealoccasion_id AND is_eat_out = :is_eat_out LIMIT :servings", array( ':eatlog_id' => $eatLog->id, ':meal_id' => $this->request->data['id'], ':mealoccasion_id' => $this->request->data['mealoccasion_id'], ':is_eat_out' => $this->request->data['is_eat_out'], ':servings' => $this->request->data['servings'] )); //any EatLogItems associated with this meal are deleted thanks to ON DELETE CASCADE constraint on eatlogmeal_id foreign key in eatlogitme table } $this->calculateTotalImpactFactor($eatLog, $plan->program_id); return $this->listEatLog(); //return new Response(Response::NOCONTENT); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m2Shf
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'eatlogmeals', 'eatlogs'
  145     1      > RETURN                                                   1

Class EatLogMeals:
Function addeatlogmeal:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 16, Position 2 = 19
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 47) Position 1 = 36, Position 2 = 39
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 44
Branch analysis from position: 40
2 jumps found. (Code = 47) Position 1 = 55, Position 2 = 58
Branch analysis from position: 55
2 jumps found. (Code = 43) Position 1 = 59, Position 2 = 68
Branch analysis from position: 59
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 68
2 jumps found. (Code = 47) Position 1 = 79, Position 2 = 82
Branch analysis from position: 79
2 jumps found. (Code = 43) Position 1 = 83, Position 2 = 92
Branch analysis from position: 83
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 92
2 jumps found. (Code = 43) Position 1 = 97, Position 2 = 183
Branch analysis from position: 97
1 jumps found. (Code = 42) Position 1 = 178
Branch analysis from position: 178
2 jumps found. (Code = 44) Position 1 = 183, Position 2 = 100
Branch analysis from position: 183
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 100
2 jumps found. (Code = 77) Position 1 = 129, Position 2 = 176
Branch analysis from position: 129
2 jumps found. (Code = 78) Position 1 = 130, Position 2 = 176
Branch analysis from position: 130
2 jumps found. (Code = 43) Position 1 = 134, Position 2 = 142
Branch analysis from position: 134
1 jumps found. (Code = 42) Position 1 = 147
Branch analysis from position: 147
1 jumps found. (Code = 42) Position 1 = 169
Branch analysis from position: 169
2 jumps found. (Code = 44) Position 1 = 172, Position 2 = 149
Branch analysis from position: 172
1 jumps found. (Code = 42) Position 1 = 129
Branch analysis from position: 129
Branch analysis from position: 149
2 jumps found. (Code = 44) Position 1 = 172, Position 2 = 149
Branch analysis from position: 172
Branch analysis from position: 149
Branch analysis from position: 142
1 jumps found. (Code = 42) Position 1 = 169
Branch analysis from position: 169
Branch analysis from position: 176
2 jumps found. (Code = 44) Position 1 = 183, Position 2 = 100
Branch analysis from position: 183
Branch analysis from position: 100
Branch analysis from position: 176
Branch analysis from position: 183
Branch analysis from position: 82
Branch analysis from position: 58
Branch analysis from position: 44
Branch analysis from position: 39
Branch analysis from position: 19
filename:       /in/m2Shf
function name:  addEatLogMeal
number of ops:  193
compiled vars:  !0 = $app, !1 = $user, !2 = $plan, !3 = $eatLog, !4 = $meal, !5 = $mealOccasion, !6 = $items, !7 = $i, !8 = $item, !9 = $eatLogMealId, !10 = $mealImpactGroup, !11 = $mIG, !12 = $items2, !13 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   BIND_GLOBAL                                              !0, 'app'
   29     1        INIT_METHOD_CALL                                         'getUser'
          2        DO_FCALL                                      0  $14     
          3        ASSIGN                                                   !1, $14
   31     4        INIT_METHOD_CALL                                         'validateDate'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_OBJ_FUNC_ARG                               $17     'date'
          7        SEND_FUNC_ARG                                            $17
          8        DO_FCALL                                      0  $18     
          9        ASSIGN_OBJ                                               'date'
         10        OP_DATA                                                  $18
   36    11        INIT_METHOD_CALL                                         !1, 'getPlan'
         12        DO_FCALL                                      0  $19     
         13        ASSIGN                                                   !2, $19
   37    14        BOOL_NOT                                         ~21     !2
         15      > JMPNZ_EX                                         ~21     ~21, ->19
         16    >   FETCH_OBJ_R                                      ~22     !2, 'id'
         17        BOOL_NOT                                         ~23     ~22
         18        BOOL                                             ~21     ~23
         19    > > JMPZ                                                     ~21, ->24
   38    20    >   NEW                                              $24     'Tonic%5CNotFoundException'
         21        SEND_VAL_EX                                              'EatLogMeal+couldn%27t+be+created.+Plan+for+current+user+not+found'
         22        DO_FCALL                                      0          
         23      > THROW                                         0          $24
   40    24    >   INIT_STATIC_METHOD_CALL                                  'R', 'findOne'
         25        SEND_VAL_EX                                              'eatlog'
         26        SEND_VAL_EX                                              '+plan_id+%3D+%3F+AND+log_date+%3D+%3F'
         27        FETCH_OBJ_R                                      ~26     !2, 'id'
         28        INIT_ARRAY                                       ~27     ~26
         29        FETCH_OBJ_R                                      ~28     'date'
         30        ADD_ARRAY_ELEMENT                                ~27     ~28
         31        SEND_VAL_EX                                              ~27
         32        DO_FCALL                                      0  $29     
         33        ASSIGN                                                   !3, $29
   42    34        BOOL_NOT                                         ~31     !3
         35      > JMPNZ_EX                                         ~31     ~31, ->39
         36    >   FETCH_OBJ_R                                      ~32     !3, 'id'
         37        BOOL_NOT                                         ~33     ~32
         38        BOOL                                             ~31     ~33
         39    > > JMPZ                                                     ~31, ->44
   44    40    >   INIT_METHOD_CALL                                         'createEatLog'
         41        SEND_VAR_EX                                              !2
         42        DO_FCALL                                      0  $34     
         43        ASSIGN                                                   !3, $34
   48    44    >   INIT_STATIC_METHOD_CALL                                  'R', 'load'
         45        SEND_VAL_EX                                              'meal'
         46        CHECK_FUNC_ARG                                           
         47        FETCH_OBJ_FUNC_ARG                               $36     'request'
         48        FETCH_OBJ_FUNC_ARG                               $37     $36, 'data'
         49        FETCH_DIM_FUNC_ARG                               $38     $37, 'id'
         50        SEND_FUNC_ARG                                            $38
         51        DO_FCALL                                      0  $39     
         52        ASSIGN                                                   !4, $39
   49    53        BOOL_NOT                                         ~41     !4
         54      > JMPNZ_EX                                         ~41     ~41, ->58
         55    >   FETCH_OBJ_R                                      ~42     !4, 'id'
         56        BOOL_NOT                                         ~43     ~42
         57        BOOL                                             ~41     ~43
         58    > > JMPZ                                                     ~41, ->68
   50    59    >   NEW                                              $44     'Tonic%5CNotFoundException'
         60        FETCH_OBJ_R                                      ~45     'request'
         61        FETCH_OBJ_R                                      ~46     ~45, 'data'
         62        FETCH_DIM_R                                      ~47     ~46, 'id'
         63        CONCAT                                           ~48     'EatLogMeal+couldn%27t+be+created.+Meal+with+id+', ~47
         64        CONCAT                                           ~49     ~48, '+not+found.'
         65        SEND_VAL_EX                                              ~49
         66        DO_FCALL                                      0          
         67      > THROW                                         0          $44
   54    68    >   INIT_STATIC_METHOD_CALL                                  'R', 'load'
         69        SEND_VAL_EX                                              'mealoccasion'
         70        CHECK_FUNC_ARG                                           
         71        FETCH_OBJ_FUNC_ARG                               $51     'request'
         72        FETCH_OBJ_FUNC_ARG                               $52     $51, 'data'
         73        FETCH_DIM_FUNC_ARG                               $53     $52, 'mealoccasion_id'
         74        SEND_FUNC_ARG                                            $53
         75        DO_FCALL                                      0  $54     
         76        ASSIGN                                                   !5, $54
   55    77        BOOL_NOT                                         ~56     !5
         78      > JMPNZ_EX                                         ~56     ~56, ->82
         79    >   FETCH_OBJ_R                                      ~57     !5, 'id'
         80        BOOL_NOT                                         ~58     ~57
         81        BOOL                                             ~56     ~58
         82    > > JMPZ                                                     ~56, ->92
   56    83    >   NEW                                              $59     'Tonic%5CNotFoundException'
         84        FETCH_OBJ_R                                      ~60     'request'
         85        FETCH_OBJ_R                                      ~61     ~60, 'data'
         86        FETCH_DIM_R                                      ~62     ~61, 'mealoccasion_id'
         87        CONCAT                                           ~63     'EatLogMeal+couldn%27t+be+created.+Meal+occasion+with+id+', ~62
         88        CONCAT                                           ~64     ~63, '+not+found.'
         89        SEND_VAL_EX                                              ~64
         90        DO_FCALL                                      0          
         91      > THROW                                         0          $59
   59    92    >   FETCH_OBJ_R                                      ~66     'request'
         93        FETCH_OBJ_R                                      ~67     ~66, 'data'
         94        FETCH_DIM_R                                      ~68     ~67, 'servings'
         95        IS_SMALLER                                               0, ~68
         96      > JMPZ                                                     ~69, ->183
   61    97    >   ASSIGN                                                   !6, <array>
   69    98        ASSIGN                                                   !7, 0
         99      > JMP                                                      ->178
   70   100    >   INIT_STATIC_METHOD_CALL                                  'R', 'dispense'
        101        SEND_VAL_EX                                              'eatlogmeal'
        102        DO_FCALL                                      0  $72     
        103        ASSIGN                                                   !8, $72
   71   104        ASSIGN_OBJ                                               !8, 'eatlog'
        105        OP_DATA                                                  !3
   72   106        ASSIGN_OBJ                                               !8, 'meal'
        107        OP_DATA                                                  !4
   73   108        ASSIGN_OBJ                                               !8, 'mealoccasion'
        109        OP_DATA                                                  !5
   74   110        FETCH_OBJ_R                                      ~78     'request'
        111        FETCH_OBJ_R                                      ~79     ~78, 'data'
        112        FETCH_DIM_R                                      ~80     ~79, 'is_eat_out'
        113        BOOL                                             ~81     ~80
        114        ASSIGN_OBJ                                               !8, 'is_eat_out'
        115        OP_DATA                                                  ~81
   75   116        INIT_STATIC_METHOD_CALL                                  'R', 'store'
        117        SEND_VAR_EX                                              !8
        118        DO_FCALL                                      0  $82     
        119        ASSIGN                                                   !9, $82
   78   120        INIT_STATIC_METHOD_CALL                                  'R', 'find'
        121        SEND_VAL_EX                                              'mealimpactgroup'
        122        SEND_VAL_EX                                              '+meal_id+%3D+%3Ameal_id'
        123        FETCH_OBJ_R                                      ~84     !4, 'id'
        124        INIT_ARRAY                                       ~85     ~84, '%3Ameal_id'
        125        SEND_VAL_EX                                              ~85
        126        DO_FCALL                                      0  $86     
        127        ASSIGN                                                   !10, $86
   79   128      > FE_RESET_R                                       $88     !10, ->176
        129    > > FE_FETCH_R                                               $88, !11, ->176
   81   130    >   ASSIGN                                                   !12, <array>
   82   131        FETCH_OBJ_R                                      ~90     !11, 'servings'
        132        IS_SMALLER                                               1, ~90
        133      > JMPZ                                                     ~91, ->142
   83   134    >   INIT_STATIC_METHOD_CALL                                  'R', 'dispense'
        135        SEND_VAL_EX                                              'eatlogitem'
        136        CHECK_FUNC_ARG                                           
        137        FETCH_OBJ_FUNC_ARG                               $92     !11, 'servings'
        138        SEND_FUNC_ARG                                            $92
        139        DO_FCALL                                      0  $93     
        140        ASSIGN                                                   !12, $93
        141      > JMP                                                      ->147
   85   142    >   INIT_STATIC_METHOD_CALL                                  'R', 'dispense'
        143        SEND_VAL_EX                                              'eatlogitem'
        144        DO_FCALL                                      0  $96     
        145        ASSIGN_DIM                                               !12, 0
        146        OP_DATA                                                  $96
   87   147    >   ASSIGN                                                   !13, 0
        148      > JMP                                                      ->169
   88   149    >   FETCH_DIM_W                                      $98     !12, !13
        150        ASSIGN_OBJ                                               $98, 'eatlog'
        151        OP_DATA                                                  !3
   89   152        FETCH_OBJ_R                                      ~102    !11, 'eatimpactgroup_id'
        153        FETCH_DIM_W                                      $100    !12, !13
        154        ASSIGN_OBJ                                               $100, 'eatimpactgroup_id'
        155        OP_DATA                                                  ~102
   90   156        FETCH_DIM_W                                      $103    !12, !13
        157        ASSIGN_OBJ                                               $103, 'mealoccasion'
        158        OP_DATA                                                  !5
   91   159        FETCH_OBJ_R                                      ~107    'request'
        160        FETCH_OBJ_R                                      ~108    ~107, 'data'
        161        FETCH_DIM_R                                      ~109    ~108, 'is_eat_out'
        162        FETCH_DIM_W                                      $105    !12, !13
        163        ASSIGN_OBJ                                               $105, 'is_eat_out'
        164        OP_DATA                                                  ~109
   92   165        FETCH_DIM_W                                      $110    !12, !13
        166        ASSIGN_OBJ                                               $110, 'eatlogmeal'
        167        OP_DATA                                                  !8
   87   168        PRE_INC                                                  !13
        169    >   FETCH_OBJ_R                                      ~113    !11, 'servings'
        170        IS_SMALLER                                               !13, ~113
        171      > JMPNZ                                                    ~114, ->149
   94   172    >   INIT_STATIC_METHOD_CALL                                  'R', 'storeAll'
        173        SEND_VAR_EX                                              !12
        174        DO_FCALL                                      0          
   79   175      > JMP                                                      ->129
        176    >   FE_FREE                                                  $88
   69   177        PRE_INC                                                  !7
        178    >   FETCH_OBJ_R                                      ~117    'request'
        179        FETCH_OBJ_R                                      ~118    ~117, 'data'
        180        FETCH_DIM_R                                      ~119    ~118, 'servings'
        181        IS_SMALLER                                               !7, ~119
        182      > JMPNZ                                                    ~120, ->100
  100   183    >   INIT_METHOD_CALL                                         'calculateTotalImpactFactor'
        184        SEND_VAR_EX                                              !3
        185        CHECK_FUNC_ARG                                           
        186        FETCH_OBJ_FUNC_ARG                               $121    !2, 'program_id'
        187        SEND_FUNC_ARG                                            $121
        188        DO_FCALL                                      0          
  101   189        INIT_METHOD_CALL                                         'listEatLog'
        190        DO_FCALL                                      0  $123    
        191      > RETURN                                                   $123
  102   192*     > RETURN                                                   null

End of function addeatlogmeal

Function removeeatlogmeals:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 23
2 jumps found. (Code = 47) Position 1 = 35, Position 2 = 38
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 43
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 70
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 70
Branch analysis from position: 43
Branch analysis from position: 38
Branch analysis from position: 18
filename:       /in/m2Shf
function name:  removeEatLogMeals
number of ops:  80
compiled vars:  !0 = $user, !1 = $plan, !2 = $eatLog
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  112     0  E >   INIT_METHOD_CALL                                         'getUser'
          1        DO_FCALL                                      0  $3      
          2        ASSIGN                                                   !0, $3
  114     3        INIT_METHOD_CALL                                         'validateDate'
          4        CHECK_FUNC_ARG                                           
          5        FETCH_OBJ_FUNC_ARG                               $6      'date'
          6        SEND_FUNC_ARG                                            $6
          7        DO_FCALL                                      0  $7      
          8        ASSIGN_OBJ                                               'date'
          9        OP_DATA                                                  $7
  119    10        INIT_METHOD_CALL                                         !0, 'getPlan'
         11        DO_FCALL                                      0  $8      
         12        ASSIGN                                                   !1, $8
  120    13        BOOL_NOT                                         ~10     !1
         14      > JMPNZ_EX                                         ~10     ~10, ->18
         15    >   FETCH_OBJ_R                                      ~11     !1, 'id'
         16        BOOL_NOT                                         ~12     ~11
         17        BOOL                                             ~10     ~12
         18    > > JMPZ                                                     ~10, ->23
  121    19    >   NEW                                              $13     'Tonic%5CNotFoundException'
         20        SEND_VAL_EX                                              'EatLog+couldn%27t+be+created.+Plan+for+current+user+not+found'
         21        DO_FCALL                                      0          
         22      > THROW                                         0          $13
  123    23    >   INIT_STATIC_METHOD_CALL                                  'R', 'findOne'
         24        SEND_VAL_EX                                              'eatlog'
         25        SEND_VAL_EX                                              '+plan_id+%3D+%3F+AND+log_date+%3D+%3F'
         26        FETCH_OBJ_R                                      ~15     !1, 'id'
         27        INIT_ARRAY                                       ~16     ~15
         28        FETCH_OBJ_R                                      ~17     'date'
         29        ADD_ARRAY_ELEMENT                                ~16     ~17
         30        SEND_VAL_EX                                              ~16
         31        DO_FCALL                                      0  $18     
         32        ASSIGN                                                   !2, $18
  125    33        BOOL_NOT                                         ~20     !2
         34      > JMPNZ_EX                                         ~20     ~20, ->38
         35    >   FETCH_OBJ_R                                      ~21     !2, 'id'
         36        BOOL_NOT                                         ~22     ~21
         37        BOOL                                             ~20     ~22
         38    > > JMPZ                                                     ~20, ->43
  127    39    >   INIT_METHOD_CALL                                         'createEatLog'
         40        SEND_VAR_EX                                              !1
         41        DO_FCALL                                      0  $23     
         42        ASSIGN                                                   !2, $23
  129    43    >   FETCH_OBJ_R                                      ~25     'request'
         44        FETCH_OBJ_R                                      ~26     ~25, 'data'
         45        FETCH_DIM_R                                      ~27     ~26, 'servings'
         46        IS_SMALLER                                               0, ~27
         47      > JMPZ                                                     ~28, ->70
  131    48    >   INIT_STATIC_METHOD_CALL                                  'R', 'exec'
         49        SEND_VAL_EX                                              'DELETE+FROM+eatlogmeal+WHERE+eatlog_id+%3D+%3Aeatlog_id+AND+meal_id+%3D+%3Ameal_id+AND+mealoccasion_id+%3D+%3Amealoccasion_id+AND+is_eat_out+%3D+%3Ais_eat_out+LIMIT+%3Aservings'
  133    50        FETCH_OBJ_R                                      ~29     !2, 'id'
         51        INIT_ARRAY                                       ~30     ~29, '%3Aeatlog_id'
  134    52        FETCH_OBJ_R                                      ~31     'request'
         53        FETCH_OBJ_R                                      ~32     ~31, 'data'
         54        FETCH_DIM_R                                      ~33     ~32, 'id'
         55        ADD_ARRAY_ELEMENT                                ~30     ~33, '%3Ameal_id'
  135    56        FETCH_OBJ_R                                      ~34     'request'
         57        FETCH_OBJ_R                                      ~35     ~34, 'data'
         58        FETCH_DIM_R                                      ~36     ~35, 'mealoccasion_id'
         59        ADD_ARRAY_ELEMENT                                ~30     ~36, '%3Amealoccasion_id'
  136    60        FETCH_OBJ_R                                      ~37     'request'
         61        FETCH_OBJ_R                                      ~38     ~37, 'data'
         62        FETCH_DIM_R                                      ~39     ~38, 'is_eat_out'
         63        ADD_ARRAY_ELEMENT                                ~30     ~39, '%3Ais_eat_out'
  137    64        FETCH_OBJ_R                                      ~40     'request'
         65        FETCH_OBJ_R                                      ~41     ~40, 'data'
         66        FETCH_DIM_R                                      ~42     ~41, 'servings'
         67        ADD_ARRAY_ELEMENT                                ~30     ~42, '%3Aservings'
         68        SEND_VAL_EX                                              ~30
         69        DO_FCALL                                      0          
  141    70    >   INIT_METHOD_CALL                                         'calculateTotalImpactFactor'
         71        SEND_VAR_EX                                              !2
         72        CHECK_FUNC_ARG                                           
         73        FETCH_OBJ_FUNC_ARG                               $44     !1, 'program_id'
         74        SEND_FUNC_ARG                                            $44
         75        DO_FCALL                                      0          
  142    76        INIT_METHOD_CALL                                         'listEatLog'
         77        DO_FCALL                                      0  $46     
         78      > RETURN                                                   $46
  144    79*     > RETURN                                                   null

End of function removeeatlogmeals

End of class EatLogMeals.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.2 ms | 1419 KiB | 13 Q