Executes a set of actions, defined in pairs.

@param   array    actions
@return  boolean
7650
public function execute($actions)
	{
		foreach ($actions as $func => $args)
		{
			if ( ! $this->$func($args))
				return FALSE;
		}

		return TRUE;
	}
522965
protected function prepareActions()
    {
        usort($this->actions, function ($one, $two) {
            if ($one['priority'] === $two['priority']) {
                return 0;
            }

            return ($one['priority'] > $two['priority']) ? -1 : 1;
        });
    }
308533
public function execute() {
		$tasks = array();
		$this->TaskServer->killZombies();
		while ($this->TaskServer->freeSlots() > 0 && ($task = $this->TaskServer->getPending())) {
			$tasks[] = $task;
		}

		if (empty($tasks)) {
			return;
		}

		$events = (array)Configure::read('Task.processEvents');
		
		$models = array();
		foreach ($events as $event) {
			$models[$event['model']] = ClassRegistry::init($event['model']);
			CakeEventManager::instance()->attach($models[$event['model']], $event['key'], $event['options']);
		}

		foreach ($tasks as $task) {
			$this->_run($task);
		}

		foreach ($events as $event) {
			CakeEventManager::instance()->detach($models[$event['model']], $event['key'], $event['options']);
		}
	}
1286956
public function executeOne($arguments = array())
    {
        $result = $this->execute($arguments);
        if (is_array($result) && count($result) > 0) {
            $result = $result[0];
        }
        return $result;
    }
422225
protected function executeRemoveActions()
    {
        if (!empty($this->actions[self::GROUP_REMOVE])) {
            $this->executeActions(self::GROUP_REMOVE);
        }
    }
241069
public boolean execute(final int[] columnIndexes) throws SQLException {
        return execute(new Executor() {
            
            @Override
            public boolean execute(final Statement statement, final String sql) throws SQLException {
                return statement.execute(sql, columnIndexes);
            }
        });
    }
232873
public function setActions($actions) {
        if (!is_array($actions)) {
            $actions = array($actions);
        }
        $this->actions = array_filter($actions, array($this, 'isValidAction'));
        return $this;
    }
1093067
private static void checkActionsInCommon(Actioner actioner, Collection<ActionRef> actions)
    {
        if (actions.isEmpty())
        {
            actions.addAll(actioner.getActions());
        }
        else
        {
            actions.retainAll(actioner.getActions());
        }
    }
1002410
public function _execute( $action, $params = array() ) 
	{
		if ( method_exists( $this, 'action_'.$action ) ) 
		{
			call_user_func( array( $this, 'action_'.$action ), $params );
		} 
		else 
		{
			CCCli::line( "There is no action {$action}.", 'red' );
		}
	}
878923
public function execute()
    {
        try {
            if ($action = $this->action) {
                return $action($this);
            } else {
                foreach ($this->parseSteps as $parseStep) {
                    if (is_string($parseStep)) {
                        $parseStep = [$this->controller, $parseStep];
                    }

                    if ($parseStep($this) === false) {
                        return false;
                    }
                }

                $queryStep = $this->queryStep;
                if (is_string($queryStep)) {
                    $queryStep = [$this->controller, $queryStep];
                }

                $result = $queryStep($this);

                foreach ($this->transformSteps as $transformStep) {
                    if (is_string($transformStep)) {
                        $transformStep = [$this->controller, $transformStep];
                    }

                    if ($transformStep($result, $this) === false) {
                        return false;
                    }
                }
            }
        // handle API exceptions
        } catch (Error\Base $ex) {
            if (method_exists($this->controller, 'handleError')) {
                $this->controller->handleError($ex, $this);
            }
        }

        return true;
    }
404091
public function setObjectActions(array $actions)
    {
        $this->parsedObjectActions = false;

        $actions = $this->mergeActions($this->defaultObjectActions(), $actions);

        /** Enable seamless button group */
        if (isset($actions['edit'])) {
            $actions['edit']['actionType'] = 'seamless';
        }

        $this->objectActions = $actions;

        return $this;
    }
1044361
def run_actions
        catch_exceptions do
          @success = if block_given?
            result = yield
            actions.each {|action| results[action] = result}
            !!result
          else
            actions.compact.each {|action| !skip_actions && results[action] = object.send(action)}
            results.values.all?
          end
        end
      end
280679
protected function _actionCheck()
    {
        $actions = $this->getConfig('actions');
        if (is_bool($actions)) {
            return $actions;
        }

        return in_array($this->request->getParam('action'), (array)$actions, true);
    }
486445
public function run() {
		$array = ValueUtils::val($this->array);
		foreach ($array as $key => $value) {
			if ($this->key != null) {
				$this->key->setValue($key);
			}
			if ($this->value != null) {
				$this->value->setValue($value);
			}
			foreach ($this->actions as $action) {
				$action->run();
			}
		}
	}
966858
public function _execute(array $params = null)
    {
        if (!$this->_stmt) {
            return false;
        }

        // if no params were given as an argument to execute(),
        // then default to the _bindParam array
        if ($params === null) {
            $params = $this->_bindParam;
        }
        // send $params as input parameters to the statement
        if ($params) {
            array_unshift($params, str_repeat('s', count($params)));
            $stmtParams = array();
            foreach ($params as $k => &$value) {
                $stmtParams[$k] = &$value;
            }
            call_user_func_array(
                array($this->_stmt, 'bind_param'),
                $stmtParams
                );
        }

        // execute the statement
        $retval = $this->_stmt->execute();
        if ($retval === false) {
            /**
             * @see Zend_Db_Statement_Mysqli_Exception
             */
            // require_once 'Zend/Db/Statement/Mysqli/Exception.php';
            throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement execute error : " . $this->_stmt->error, $this->_stmt->errno);
        }


        // retain metadata
        if ($this->_meta === null) {
            $this->_meta = $this->_stmt->result_metadata();
            if ($this->_stmt->errno) {
                /**
                 * @see Zend_Db_Statement_Mysqli_Exception
                 */
                // require_once 'Zend/Db/Statement/Mysqli/Exception.php';
                throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement metadata error: " . $this->_stmt->error, $this->_stmt->errno);
            }
        }

        // statements that have no result set do not return metadata
        if ($this->_meta !== false) {

            // get the column names that will result
            $this->_keys = array();
            foreach ($this->_meta->fetch_fields() as $col) {
                $this->_keys[] = $this->_adapter->foldCase($col->name);
            }

            // set up a binding space for result variables
            $this->_values = array_fill(0, count($this->_keys), null);

            // set up references to the result binding space.
            // just passing $this->_values in the call_user_func_array()
            // below won't work, you need references.
            $refs = array();
            foreach ($this->_values as $i => &$f) {
                $refs[$i] = &$f;
            }

            $this->_stmt->store_result();
            // bind to the result variables
            call_user_func_array(
                array($this->_stmt, 'bind_result'),
                $this->_values
            );
        }
        return $retval;
    }
866913
public void setActions(java.util.Collection<ActionDeclaration> actions) {
        if (actions == null) {
            this.actions = null;
            return;
        }

        this.actions = new java.util.ArrayList<ActionDeclaration>(actions);
    }
151384
public function runStepActions()
    {
        $step = $this->getCurrentStep();

        foreach ($step->getActions() as $action) {
            $action = $this->getAction($action);

            if (false == $action->run($this->getModel())) {

                return false;
            }
        }

        return true;
    }