3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Solr_Importer_Ee { protected $_restClient = null; protected $_solr = null; public function __construct(Solr $solr) { $this->_solr = $solr; $this->_restClient = $solr->getRestClient(); } public function update() { $this->_bootstrap(); $items = $this->getItems('updated_date > '.$GLOBALS['_SOLR']['lastRunTime']); $client = $this->_restClient; $cores = $this->_solr->config('ee_cores'); $client->setCore($cores[0]); $model = new Solr_Model_Ee(); foreach ($items as $item) { $client->add($model->as_document($item)); } } public function reindex() { $this->_bootstrap(); $client = $this->_restClient; $cores = $this->_solr->config('ee_cores'); $liveCore = $cores[0]; $deckCore = $cores[1]; echo "using $deckCore...\n"; $this->_restClient->setCore($deckCore); $this->_restClient->deleteIndex(); echo "Starting data import into index...\n"; @set_time_limit(-1); // Expand upon ExpressionEngines timeouts, set to infinite. $items = $this->getItems(); $model = new Solr_Model_Ee(); foreach ($items as $item) { $client->add($model->as_document($item)); } $this->_restClient->swapCores($deckCore, $liveCore); } /** * Bootstraps EE * @throws Exception * @return */ protected function _bootstrap() { try { $system_path = realpath($this->_solr->getAppDir().$this->_solr->config('ee_app_path')); set_include_path(get_include_path() . PATH_SEPARATOR . $system_path); // Here, if we don't create that controller, it won't work // class Required_Controller extends CI_Controller {} $assign_to_config['enable_query_strings'] = TRUE; $assign_to_config['subclass_prefix'] = 'EE_'; if (realpath($system_path) !== FALSE) { $system_path = realpath($system_path).'/'; } // ensure there's a trailing slash $system_path = rtrim($system_path, '/').'/'; $_SERVER['REQUEST_URI'] = 'solr.gif'; define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); define('EXT', '.php'); define('BASEPATH', str_replace("\\", "/", $system_path.'codeigniter/system/')); define('APPPATH', $system_path.'expressionengine/'); define('FCPATH', str_replace(SELF, '', __FILE__)); define('SYSDIR', trim(strrchr(trim(str_replace("\\", "/", $system_path), '/'), '/'), '/')); define('UTF8_ENABLED', false); define('CI_VERSION', '2.0'); //define('AJAX_REQUEST',false); define('DEBUG',false); require BASEPATH.'core/Common'.EXT; require APPPATH.'config/constants'.EXT; $CFG =& load_class('Config', 'core'); $URI =& load_class('URI', 'core'); $IN =& load_class('Input', 'core'); $OUT =& load_class('Output', 'core'); $LANG =& load_class('Lang', 'core'); $SEC =& load_class('Security', 'core'); $loader = load_class('Loader', 'core'); // Load the base controller class require BASEPATH.'core/Controller'.EXT; function &get_instance() { return CI_Controller::get_instance(); } $EE = @new Solr_Importer_Ee_Bootstrap; $this->EE = $EE; return $this->EE; } catch (Exception $e) { throw new Exception($e->getMessage()); } } public function getItems($filter = null) { $channelList = $this->_solr->config('channels'); $SOLR_entries = array(); $site_mapping = $this->_solr->config('ee_sites'); $configSites = $this->_solr->config('ee_sites'); if ( ! is_array( $configSites ) ) { die('Site and Store IDs need to be defined in config.php'); } // retrieve all channels we have defined in the config. $this->EE->db->where_in('channel_name', array_keys($channelList)); $channels = $this->EE->db->get('channels' )->result(); foreach($channels as $channel) { // Retrieve all custom fields $fields = $this->EE->db->get_where('channel_fields', array( 'group_id' => $channel->field_group ) )->result(); //Grab all the categories for an entry $this->EE->db->select('(select GROUP_CONCAT(cat_name) from exp_category_posts cp join exp_categories c on c.cat_id = cp.cat_id where cp.entry_id = exp_d.entry_id) as cats', false); // Build out which custom fields we need and get entries $channel_title_fields = array('entry_id','title','url_title','status','year','month','day','entry_date'); foreach( $channel_title_fields as $i) $this->EE->db->select('t.' . $i); $this->EE->db->select('unix_timestamp(t.edit_date) as updated_date'); $this->EE->db->join('channel_titles t', 't.entry_id=d.entry_id'); $this->EE->db->join('channel_data pd', 'pd.entry_id=d.entry_id'); //$this->EE->db->select('pl.short_name')->join('publisher_languages pl', 'pl.id=pd.publisher_lang_id'); $field_map = array(); foreach($fields as $field) { $this->EE->db->select("pd.field_id_{$field->field_id}"); $field_map[ 'field_' . $field->field_name] = 'field_id_' . $field->field_id; } $this->EE->db->where('d.channel_id', $channel->channel_id); if ($filter) { $filter = str_replace('updated_date', 'unix_timestamp(t.edit_date)', $filter); $this->EE->db->where($filter); } $this->EE->db->where('t.status', 'open'); $entries = $this->EE->db->get('channel_data exp_d'); // Build items. foreach( $entries->result() as $entry ) { $base_item = $this->makeItem( $channel, $field_map, $entry ); /** * Figure out solr id for content */ $base_item['site_id'] = 1;//hard coding until multi site is needed - $site_mapping[$entry->short_name]; $SOLR_entries[] = $base_item; } } return $SOLR_entries; } function makeItem( $channel, $fieldmap, $entry ) { $data = array(); $tmpdata = array(); $data['entry_id'] = $entry->entry_id; $data['channel_id'] = $channel->channel_id; $data['channel_name'] = $channel->channel_name; $data['channel_title'] = htmlentities($channel->channel_title); $data['title'] = $entry->title; $data['status'] = $entry->status; $data['updated'] = $entry->entry_date; $data['category'] = explode(',',$entry->cats); //$data['fields'] = Solr::config('defaults'); $channelRules = $this->_solr->config('channels'); if ( array_key_exists( $channel->channel_name, $channelRules ) ) { // if this channel has custom fields $fields = $channelRules[$channel->channel_name]; foreach($fields as $field => $rules) { is_array($rules) or $rules = array( 'type' => '', 'value' => $rules); preg_match_all('/@\!(\w+)/', $rules['value'], $matches); // handle tmp fields foreach($matches[1] as $match) { $tmp = array_key_exists($match, $tmpdata) ? $tmpdata[$match] : ''; $rules['value'] = str_replace('@!' . $match, $tmp, $rules['value']); } unset($matches); preg_match_all('/@(\w+)/', $rules['value'], $matches); foreach($matches[1] as $orig_match) { $match = array_key_exists($orig_match, $fieldmap) ? $fieldmap[$orig_match] : $orig_match; $tmp = property_exists($entry, $match) ? $entry->{$match} : (property_exists($channel, $match) ? $channel->{$match}: $match); $rules['value'] = str_replace('@' . $orig_match, $tmp, $rules['value']); } unset($matches); switch ($rules['type']) { case 'expression': $rules['value'] = $this->parse( $rules['value'] ); break; default: $rules['value'] = filter_var( strip_tags($rules['value']), FILTER_SANITIZE_STRING); //$rules['value'] = filter_var($rules['value'], FILTER_SANITIZE_STRING); } switch (@$rules['save']) { case 'tmp': $tmpdata[$field] = $rules['value']; break; default: $data['fields'][$field] = $rules['value']; } } } return $data; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0MAVm
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  223     0  E > > RETURN                                                   1

Function %00get_instance%2Fin%2F0MAVm%3A95%240:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/0MAVm
function name:  get_instance
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   97     0  E >   INIT_STATIC_METHOD_CALL                                  'CI_Controller', 'get_instance'
          1        DO_FCALL                                      0  $0      
          2      > RETURN_BY_REF                                            $0
   98     3*     > RETURN_BY_REF                                            null

End of function %00get_instance%2Fin%2F0MAVm%3A95%240

Class Solr_Importer_Ee:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0MAVm
function name:  __construct
number of ops:  8
compiled vars:  !0 = $solr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               '_solr'
          2        OP_DATA                                                  !0
    9     3        INIT_METHOD_CALL                                         !0, 'getRestClient'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN_OBJ                                               '_restClient'
          6        OP_DATA                                                  $3
   10     7      > RETURN                                                   null

End of function __construct

Function update:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 34
Branch analysis from position: 26
2 jumps found. (Code = 78) Position 1 = 27, Position 2 = 34
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/0MAVm
function name:  update
number of ops:  36
compiled vars:  !0 = $items, !1 = $client, !2 = $cores, !3 = $model, !4 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_METHOD_CALL                                         '_bootstrap'
          1        DO_FCALL                                      0          
   14     2        INIT_METHOD_CALL                                         'getItems'
          3        FETCH_R                      global              ~6      'GLOBALS'
          4        FETCH_DIM_R                                      ~7      ~6, '_SOLR'
          5        FETCH_DIM_R                                      ~8      ~7, 'lastRunTime'
          6        CONCAT                                           ~9      'updated_date+%3E+', ~8
          7        SEND_VAL_EX                                              ~9
          8        DO_FCALL                                      0  $10     
          9        ASSIGN                                                   !0, $10
   15    10        FETCH_OBJ_R                                      ~12     '_restClient'
         11        ASSIGN                                                   !1, ~12
   16    12        FETCH_OBJ_R                                      ~14     '_solr'
         13        INIT_METHOD_CALL                                         ~14, 'config'
         14        SEND_VAL_EX                                              'ee_cores'
         15        DO_FCALL                                      0  $15     
         16        ASSIGN                                                   !2, $15
   17    17        INIT_METHOD_CALL                                         !1, 'setCore'
         18        CHECK_FUNC_ARG                                           
         19        FETCH_DIM_FUNC_ARG                               $17     !2, 0
         20        SEND_FUNC_ARG                                            $17
         21        DO_FCALL                                      0          
   18    22        NEW                                              $19     'Solr_Model_Ee'
         23        DO_FCALL                                      0          
         24        ASSIGN                                                   !3, $19
   19    25      > FE_RESET_R                                       $22     !0, ->34
         26    > > FE_FETCH_R                                               $22, !4, ->34
   20    27    >   INIT_METHOD_CALL                                         !1, 'add'
         28        INIT_METHOD_CALL                                         !3, 'as_document'
         29        SEND_VAR_EX                                              !4
         30        DO_FCALL                                      0  $23     
         31        SEND_VAR_NO_REF_EX                                       $23
         32        DO_FCALL                                      0          
   19    33      > JMP                                                      ->26
         34    >   FE_FREE                                                  $22
   22    35      > RETURN                                                   null

End of function update

Function reindex:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 37, Position 2 = 45
Branch analysis from position: 37
2 jumps found. (Code = 78) Position 1 = 38, Position 2 = 45
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
filename:       /in/0MAVm
function name:  reindex
number of ops:  52
compiled vars:  !0 = $client, !1 = $cores, !2 = $liveCore, !3 = $deckCore, !4 = $items, !5 = $model, !6 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_METHOD_CALL                                         '_bootstrap'
          1        DO_FCALL                                      0          
   26     2        FETCH_OBJ_R                                      ~8      '_restClient'
          3        ASSIGN                                                   !0, ~8
   27     4        FETCH_OBJ_R                                      ~10     '_solr'
          5        INIT_METHOD_CALL                                         ~10, 'config'
          6        SEND_VAL_EX                                              'ee_cores'
          7        DO_FCALL                                      0  $11     
          8        ASSIGN                                                   !1, $11
   28     9        FETCH_DIM_R                                      ~13     !1, 0
         10        ASSIGN                                                   !2, ~13
   29    11        FETCH_DIM_R                                      ~15     !1, 1
         12        ASSIGN                                                   !3, ~15
   30    13        ROPE_INIT                                     3  ~18     'using+'
         14        ROPE_ADD                                      1  ~18     ~18, !3
         15        ROPE_END                                      2  ~17     ~18, '...%0A'
         16        ECHO                                                     ~17
   31    17        FETCH_OBJ_R                                      ~20     '_restClient'
         18        INIT_METHOD_CALL                                         ~20, 'setCore'
         19        SEND_VAR_EX                                              !3
         20        DO_FCALL                                      0          
   32    21        FETCH_OBJ_R                                      ~22     '_restClient'
         22        INIT_METHOD_CALL                                         ~22, 'deleteIndex'
         23        DO_FCALL                                      0          
   33    24        ECHO                                                     'Starting+data+import+into+index...%0A'
   34    25        BEGIN_SILENCE                                    ~24     
         26        INIT_FCALL                                               'set_time_limit'
         27        SEND_VAL                                                 -1
         28        DO_ICALL                                                 
         29        END_SILENCE                                              ~24
   35    30        INIT_METHOD_CALL                                         'getItems'
         31        DO_FCALL                                      0  $26     
         32        ASSIGN                                                   !4, $26
   36    33        NEW                                              $28     'Solr_Model_Ee'
         34        DO_FCALL                                      0          
         35        ASSIGN                                                   !5, $28
   37    36      > FE_RESET_R                                       $31     !4, ->45
         37    > > FE_FETCH_R                                               $31, !6, ->45
   38    38    >   INIT_METHOD_CALL                                         !0, 'add'
         39        INIT_METHOD_CALL                                         !5, 'as_document'
         40        SEND_VAR_EX                                              !6
         41        DO_FCALL                                      0  $32     
         42        SEND_VAR_NO_REF_EX                                       $32
         43        DO_FCALL                                      0          
   37    44      > JMP                                                      ->37
         45    >   FE_FREE                                                  $31
   40    46        FETCH_OBJ_R                                      ~34     '_restClient'
         47        INIT_METHOD_CALL                                         ~34, 'swapCores'
         48        SEND_VAR_EX                                              !3
         49        SEND_VAR_EX                                              !2
         50        DO_FCALL                                      0          
   41    51      > RETURN                                                   null

End of function reindex

Function _bootstrap:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 33
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
Found catch point at position: 173
Branch analysis from position: 173
2 jumps found. (Code = 107) Position 1 = 174, Position 2 = -2
Branch analysis from position: 174
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/0MAVm
function name:  _bootstrap
number of ops:  181
compiled vars:  !0 = $system_path, !1 = $assign_to_config, !2 = $CFG, !3 = $URI, !4 = $IN, !5 = $OUT, !6 = $LANG, !7 = $SEC, !8 = $loader, !9 = $EE, !10 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   50     0  E >   INIT_FCALL                                               'realpath'
          1        FETCH_OBJ_R                                      ~11     '_solr'
          2        INIT_METHOD_CALL                                         ~11, 'getAppDir'
          3        DO_FCALL                                      0  $12     
          4        FETCH_OBJ_R                                      ~13     '_solr'
          5        INIT_METHOD_CALL                                         ~13, 'config'
          6        SEND_VAL_EX                                              'ee_app_path'
          7        DO_FCALL                                      0  $14     
          8        CONCAT                                           ~15     $12, $14
          9        SEND_VAL                                                 ~15
         10        DO_ICALL                                         $16     
         11        ASSIGN                                                   !0, $16
   51    12        INIT_FCALL                                               'set_include_path'
         13        INIT_FCALL                                               'get_include_path'
         14        DO_ICALL                                         $18     
         15        CONCAT                                           ~19     $18, '%3A'
         16        CONCAT                                           ~20     ~19, !0
         17        SEND_VAL                                                 ~20
         18        DO_ICALL                                                 
   56    19        ASSIGN_DIM                                               !1, 'enable_query_strings'
         20        OP_DATA                                                  <true>
   57    21        ASSIGN_DIM                                               !1, 'subclass_prefix'
         22        OP_DATA                                                  'EE_'
   60    23        INIT_FCALL                                               'realpath'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $24     
         26        TYPE_CHECK                                  1018          $24
         27      > JMPZ                                                     ~25, ->33
   62    28    >   INIT_FCALL                                               'realpath'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $26     
         31        CONCAT                                           ~27     $26, '%2F'
         32        ASSIGN                                                   !0, ~27
   66    33    >   INIT_FCALL                                               'rtrim'
         34        SEND_VAR                                                 !0
         35        SEND_VAL                                                 '%2F'
         36        DO_ICALL                                         $29     
         37        CONCAT                                           ~30     $29, '%2F'
         38        ASSIGN                                                   !0, ~30
   68    39        FETCH_W                      global              $32     '_SERVER'
         40        ASSIGN_DIM                                               $32, 'REQUEST_URI'
         41        OP_DATA                                                  'solr.gif'
   70    42        INIT_FCALL                                               'define'
         43        SEND_VAL                                                 'SELF'
         44        INIT_FCALL                                               'pathinfo'
         45        SEND_VAL                                                 '%2Fin%2F0MAVm'
         46        SEND_VAL                                                 2
         47        DO_ICALL                                         $34     
         48        SEND_VAR                                                 $34
         49        DO_ICALL                                                 
   71    50        INIT_FCALL                                               'define'
         51        SEND_VAL                                                 'EXT'
         52        SEND_VAL                                                 '.php'
         53        DO_ICALL                                                 
   72    54        INIT_FCALL                                               'define'
         55        SEND_VAL                                                 'BASEPATH'
         56        INIT_FCALL                                               'str_replace'
         57        SEND_VAL                                                 '%5C'
         58        SEND_VAL                                                 '%2F'
         59        CONCAT                                           ~37     !0, 'codeigniter%2Fsystem%2F'
         60        SEND_VAL                                                 ~37
         61        DO_ICALL                                         $38     
         62        SEND_VAR                                                 $38
         63        DO_ICALL                                                 
   73    64        INIT_FCALL                                               'define'
         65        SEND_VAL                                                 'APPPATH'
         66        CONCAT                                           ~40     !0, 'expressionengine%2F'
         67        SEND_VAL                                                 ~40
         68        DO_ICALL                                                 
   74    69        INIT_FCALL                                               'define'
         70        SEND_VAL                                                 'FCPATH'
         71        INIT_FCALL                                               'str_replace'
         72        FETCH_CONSTANT                                   ~42     'SELF'
         73        SEND_VAL                                                 ~42
         74        SEND_VAL                                                 ''
         75        SEND_VAL                                                 '%2Fin%2F0MAVm'
         76        DO_ICALL                                         $43     
         77        SEND_VAR                                                 $43
         78        DO_ICALL                                                 
   75    79        INIT_FCALL                                               'define'
         80        SEND_VAL                                                 'SYSDIR'
         81        INIT_FCALL                                               'trim'
         82        INIT_FCALL                                               'strrchr'
         83        INIT_FCALL                                               'trim'
         84        INIT_FCALL                                               'str_replace'
         85        SEND_VAL                                                 '%5C'
         86        SEND_VAL                                                 '%2F'
         87        SEND_VAR                                                 !0
         88        DO_ICALL                                         $45     
         89        SEND_VAR                                                 $45
         90        SEND_VAL                                                 '%2F'
         91        DO_ICALL                                         $46     
         92        SEND_VAR                                                 $46
         93        SEND_VAL                                                 '%2F'
         94        DO_ICALL                                         $47     
         95        SEND_VAR                                                 $47
         96        SEND_VAL                                                 '%2F'
         97        DO_ICALL                                         $48     
         98        SEND_VAR                                                 $48
         99        DO_ICALL                                                 
   76   100        INIT_FCALL                                               'define'
        101        SEND_VAL                                                 'UTF8_ENABLED'
        102        SEND_VAL                                                 <false>
        103        DO_ICALL                                                 
   77   104        INIT_FCALL                                               'define'
        105        SEND_VAL                                                 'CI_VERSION'
        106        SEND_VAL                                                 '2.0'
        107        DO_ICALL                                                 
   79   108        INIT_FCALL                                               'define'
        109        SEND_VAL                                                 'DEBUG'
        110        SEND_VAL                                                 <false>
        111        DO_ICALL                                                 
   81   112        FETCH_CONSTANT                                   ~53     'BASEPATH'
        113        CONCAT                                           ~54     ~53, 'core%2FCommon'
        114        FETCH_CONSTANT                                   ~55     'EXT'
        115        CONCAT                                           ~56     ~54, ~55
        116        INCLUDE_OR_EVAL                                          ~56, REQUIRE
   82   117        FETCH_CONSTANT                                   ~58     'APPPATH'
        118        CONCAT                                           ~59     ~58, 'config%2Fconstants'
        119        FETCH_CONSTANT                                   ~60     'EXT'
        120        CONCAT                                           ~61     ~59, ~60
        121        INCLUDE_OR_EVAL                                          ~61, REQUIRE
   84   122        INIT_FCALL_BY_NAME                                       'load_class'
        123        SEND_VAL_EX                                              'Config'
        124        SEND_VAL_EX                                              'core'
        125        DO_FCALL                                      0  $63     
        126        ASSIGN_REF                                               !2, $63
   85   127        INIT_FCALL_BY_NAME                                       'load_class'
        128        SEND_VAL_EX                                              'URI'
        129        SEND_VAL_EX                                              'core'
        130        DO_FCALL                                      0  $65     
        131        ASSIGN_REF                                               !3, $65
   86   132        INIT_FCALL_BY_NAME                                       'load_class'
        133        SEND_VAL_EX                                              'Input'
        134        SEND_VAL_EX                                              'core'
        135        DO_FCALL                                      0  $67     
        136        ASSIGN_REF                                               !4, $67
   87   137        INIT_FCALL_BY_NAME                                       'load_class'
        138        SEND_VAL_EX                                              'Output'
        139        SEND_VAL_EX                                              'core'
        140        DO_FCALL                                      0  $69     
        141        ASSIGN_REF                                               !5, $69
   88   142        INIT_FCALL_BY_NAME                                       'load_class'
        143        SEND_VAL_EX                                              'Lang'
        144        SEND_VAL_EX                                              'core'
        145        DO_FCALL                                      0  $71     
        146        ASSIGN_REF                                               !6, $71
   89   147        INIT_FCALL_BY_NAME                                       'load_class'
        148        SEND_VAL_EX                                              'Security'
        149        SEND_VAL_EX                                              'core'
        150        DO_FCALL                                      0  $73     
        151        ASSIGN_REF                                               !7, $73
   90   152        INIT_FCALL_BY_NAME                                       'load_class'
        153        SEND_VAL_EX                                              'Loader'
        154        SEND_VAL_EX                                              'core'
        155        DO_FCALL                                      0  $75     
        156        ASSIGN                                                   !8, $75
   93   157        FETCH_CONSTANT                                   ~77     'BASEPATH'
        158        CONCAT                                           ~78     ~77, 'core%2FController'
        159        FETCH_CONSTANT                                   ~79     'EXT'
        160        CONCAT                                           ~80     ~78, ~79
        161        INCLUDE_OR_EVAL                                          ~80, REQUIRE
   95   162        DECLARE_FUNCTION                                         'get_instance'
  100   163        BEGIN_SILENCE                                    ~82     
        164        NEW                                              $83     'Solr_Importer_Ee_Bootstrap'
        165        DO_FCALL                                      0          
        166        END_SILENCE                                              ~82
        167        ASSIGN                                                   !9, $83
  102   168        ASSIGN_OBJ                                               'EE'
        169        OP_DATA                                                  !9
  103   170        FETCH_OBJ_R                                      ~87     'EE'
        171      > RETURN                                                   ~87
        172*       JMP                                                      ->180
  105   173  E > > CATCH                                       last         'Exception'
  106   174    >   NEW                                              $88     'Exception'
        175        INIT_METHOD_CALL                                         !10, 'getMessage'
        176        DO_FCALL                                      0  $89     
        177        SEND_VAR_NO_REF_EX                                       $89
        178        DO_FCALL                                      0          
        179      > THROW                                         0          $88
  108   180*     > RETURN                                                   null

End of function _bootstrap

Function getitems:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 77) Position 1 = 39, Position 2 = 153
Branch analysis from position: 39
2 jumps found. (Code = 78) Position 1 = 40, Position 2 = 153
Branch analysis from position: 40
2 jumps found. (Code = 77) Position 1 = 59, Position 2 = 67
Branch analysis from position: 59
2 jumps found. (Code = 78) Position 1 = 60, Position 2 = 67
Branch analysis from position: 60
1 jumps found. (Code = 42) Position 1 = 59
Branch analysis from position: 59
Branch analysis from position: 67
2 jumps found. (Code = 77) Position 1 = 87, Position 2 = 103
Branch analysis from position: 87
2 jumps found. (Code = 78) Position 1 = 88, Position 2 = 103
Branch analysis from position: 88
1 jumps found. (Code = 42) Position 1 = 87
Branch analysis from position: 87
Branch analysis from position: 103
2 jumps found. (Code = 43) Position 1 = 113, Position 2 = 124
Branch analysis from position: 113
2 jumps found. (Code = 77) Position 1 = 139, Position 2 = 151
Branch analysis from position: 139
2 jumps found. (Code = 78) Position 1 = 140, Position 2 = 151
Branch analysis from position: 140
1 jumps found. (Code = 42) Position 1 = 139
Branch analysis from position: 139
Branch analysis from position: 151
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
Branch analysis from position: 151
Branch analysis from position: 124
Branch analysis from position: 103
Branch analysis from position: 67
Branch analysis from position: 153
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 153
filename:       /in/0MAVm
function name:  getItems
number of ops:  156
compiled vars:  !0 = $filter, !1 = $channelList, !2 = $SOLR_entries, !3 = $site_mapping, !4 = $configSites, !5 = $channels, !6 = $channel, !7 = $fields, !8 = $channel_title_fields, !9 = $i, !10 = $field_map, !11 = $field, !12 = $entries, !13 = $entry, !14 = $base_item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  110     0  E >   RECV_INIT                                        !0      null
  112     1        FETCH_OBJ_R                                      ~15     '_solr'
          2        INIT_METHOD_CALL                                         ~15, 'config'
          3        SEND_VAL_EX                                              'channels'
          4        DO_FCALL                                      0  $16     
          5        ASSIGN                                                   !1, $16
  113     6        ASSIGN                                                   !2, <array>
  114     7        FETCH_OBJ_R                                      ~19     '_solr'
          8        INIT_METHOD_CALL                                         ~19, 'config'
          9        SEND_VAL_EX                                              'ee_sites'
         10        DO_FCALL                                      0  $20     
         11        ASSIGN                                                   !3, $20
  116    12        FETCH_OBJ_R                                      ~22     '_solr'
         13        INIT_METHOD_CALL                                         ~22, 'config'
         14        SEND_VAL_EX                                              'ee_sites'
         15        DO_FCALL                                      0  $23     
         16        ASSIGN                                                   !4, $23
  118    17        TYPE_CHECK                                  128  ~25     !4
         18        BOOL_NOT                                         ~26     ~25
         19      > JMPZ                                                     ~26, ->21
  119    20    > > EXIT                                                     'Site+and+Store+IDs+need+to+be+defined+in+config.php'
  123    21    >   FETCH_OBJ_R                                      ~27     'EE'
         22        FETCH_OBJ_R                                      ~28     ~27, 'db'
         23        INIT_METHOD_CALL                                         ~28, 'where_in'
         24        SEND_VAL_EX                                              'channel_name'
         25        INIT_FCALL                                               'array_keys'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $29     
         28        SEND_VAR_NO_REF_EX                                       $29
         29        DO_FCALL                                      0          
  124    30        FETCH_OBJ_R                                      ~31     'EE'
         31        FETCH_OBJ_R                                      ~32     ~31, 'db'
         32        INIT_METHOD_CALL                                         ~32, 'get'
         33        SEND_VAL_EX                                              'channels'
         34        DO_FCALL                                      0  $33     
         35        INIT_METHOD_CALL                                         $33, 'result'
         36        DO_FCALL                  

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.19 ms | 1428 KiB | 35 Q