Ejemplo n.º 1
0
 function RunActionPack(&$ap)
 {
     //___________________________
     if (!$ap) {
         return;
     }
     $actionNames = $ap['Actions'];
     if (!$actionNames) {
         return;
     }
     // list of action in this pack
     $actions = $this->JSData['DynActions'];
     if (!$actions) {
         return;
     }
     // all action of this page
     $flowStatus = array();
     // changed by flow control operations like IF, ELSE, STOP etc.,
     // can go to any number of sublevels like in IF .. { IF .. ELSE .. { IF .. ENDIF } ENDIF } .. ELSE .. ENDIF
     $count = count($actionNames);
     foreach ($actionNames as $aName) {
         $a = OEDynUtils::_FindByName($actions, $aName);
         $aRslt = $this->RunAction($a, $flowStatus);
         echo "==<span style='color:silver'>==TIME</span>::" . round((microtime(true) - $this->tm_start) * 10000) * 0.1 . " after Action {$aName}<br/>";
         if ($aRslt === 'DBAFC_STOP') {
             break;
         }
         // end action pack
     }
     //var_dump($this->ResultCommands);
     $this->ExecuteCommans();
     //!!improve if several packs
 }
Ejemplo n.º 2
0
 function GetContainerTypeByInd($ind)
 {
     $containerName = $this->GetContainerNameByInd($ind);
     if (!$containerName) {
         return null;
     }
     // Special containers:
     switch ($containerName) {
         case 'FormInputs':
         case 'ConstVals':
             return "Special";
             break;
         case 'FormattedItems':
             return "FI";
             break;
     }
     // see if container is one of the actions' result, in which case return action type:
     $actions = $this->Manager->JSData['DynActions'];
     if (!$actions) {
         return;
     }
     // all action of this page
     $action = OEDynUtils::_FindByName($actions, $containerName);
     if ($action && !empty($action['Type'])) {
         return $action['Type'];
         // action's type, ex. 'DBGet' for result of db SELECT queries
     }
     return $containerName;
 }