3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @package Joomla.Administrator * @subpackage com_actionlogs * * @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Actionlogs\Administrator\Dispatcher; use Joomla\CMS\Access\Exception\NotAllowed; use Joomla\CMS\Dispatcher\ComponentDispatcher; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * ComponentDispatcher class for com_admin * * @since 4.2.7 */ class Dispatcher extends ComponentDispatcher { /** * com_admin does not require check permission, so we override checkAccess method and have it empty * * @return void * * @since 4.2.7 */ protected function checkAccess() { $user = $this->app->getIdentity(); // Access check if (!$user->authorise('core.admin', )) { throw new NotAllowed($this->app->getLanguage()->_('JERROR_ALERTNOAUTHOR'), 403); } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vtB1U
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   DEFINED                                          ~0      '_JEXEC'
          1      > JMPNZ_EX                                         ~0      ~0, ->4
          2    > > EXIT                                                     
          3*       BOOL                                             ~0      <true>
   25     4    >   DECLARE_CLASS                                            'joomla%5Ccomponent%5Cactionlogs%5Cadministrator%5Cdispatcher%5Cdispatcher', 'joomla%5Ccms%5Cdispatcher%5Ccomponentdispatcher'
   43     5      > RETURN                                                   1

Class Joomla\Component\Actionlogs\Administrator\Dispatcher\Dispatcher:
Function checkaccess:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 20
Branch analysis from position: 9
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vtB1U
function name:  checkAccess
number of ops:  21
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   FETCH_OBJ_R                                      ~1      'app'
          1        INIT_METHOD_CALL                                         ~1, 'getIdentity'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
   39     4        INIT_METHOD_CALL                                         !0, 'authorise'
          5        SEND_VAL_EX                                              'core.admin'
          6        DO_FCALL                                      0  $4      
          7        BOOL_NOT                                         ~5      $4
          8      > JMPZ                                                     ~5, ->20
   40     9    >   NEW                                              $6      'Joomla%5CCMS%5CAccess%5CException%5CNotAllowed'
         10        FETCH_OBJ_R                                      ~7      'app'
         11        INIT_METHOD_CALL                                         ~7, 'getLanguage'
         12        DO_FCALL                                      0  $8      
         13        INIT_METHOD_CALL                                         $8, '_'
         14        SEND_VAL_EX                                              'JERROR_ALERTNOAUTHOR'
         15        DO_FCALL                                      0  $9      
         16        SEND_VAR_NO_REF_EX                                       $9
         17        SEND_VAL_EX                                              403
         18        DO_FCALL                                      0          
         19      > THROW                                         0          $6
   42    20    > > RETURN                                                   null

End of function checkaccess

End of class Joomla\Component\Actionlogs\Administrator\Dispatcher\Dispatcher.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.39 ms | 1395 KiB | 13 Q