original_string: public static function loadIdsAction($actionsNameAndType)
      {
          // Add url prefix if not set
          foreach ($actionsNameAndType as &$action) {
              if (2 == count($action)) {
                  $action[] = null;
              }
          }
  
          $actionIds = self::queryIdsAction($actionsNameAndType);
  
          list($queriedIds, $fieldNamesToInsert) = self::processIdsToInsert($actionsNameAndType, $actionIds);
  
          $insertedIds = self::insertNewIdsAction($actionsNameAndType, $fieldNamesToInsert);
          $queriedIds  = $queriedIds + $insertedIds;
  
          return $queriedIds;
      }
code: public static function loadIdsAction($actionsNameAndType)
      {
          // Add url prefix if not set
          foreach ($actionsNameAndType as &$action) {
              if (2 == count($action)) {
                  $action[] = null;
              }
          }
  
          $actionIds = self::queryIdsAction($actionsNameAndType);
  
          list($queriedIds, $fieldNamesToInsert) = self::processIdsToInsert($actionsNameAndType, $actionIds);
  
          $insertedIds = self::insertNewIdsAction($actionsNameAndType, $fieldNamesToInsert);
          $queriedIds  = $queriedIds + $insertedIds;
  
          return $queriedIds;
      }
code_tokens: public static function loadIdsAction ( $ actionsNameAndType ) { // Add url prefix if not set foreach ( $ actionsNameAndType as & $ action ) { if ( 2 == count ( $ action ) ) { $ action [ ] = null ; } } $ actionIds = self :: queryIdsAction ( $ actionsNameAndType ) ; list ( $ queriedIds , $ fieldNamesToInsert ) = self :: processIdsToInsert ( $ actionsNameAndType , $ actionIds ) ; $ insertedIds = self :: insertNewIdsAction ( $ actionsNameAndType , $ fieldNamesToInsert ) ; $ queriedIds = $ queriedIds + $ insertedIds ; return $ queriedIds ; }
docstring: This function will find the idaction from the lookup table log_action,
  given an Action name, type, and an optional URL Prefix.
  
  This is used to record Page URLs, Page Titles, Ecommerce items SKUs, item names, item categories
  
  If the action name does not exist in the lookup table, it will INSERT it
  @param array $actionsNameAndType Array of one or many (name,type)
  @return array Returns the an array (Field name => idaction)
docstring_tokens: This function will find the idaction from the lookup table log_action given an Action name type and an optional URL Prefix .