Launch interactions extraction
Transform interactions array to output data
Use callback & valuesAsColumns

@return $this
193580
public function run()
    {
        $this->extractInteractions();

        $this->data = $line = [];

        foreach ($this->interactions as $interaction) {
            foreach ($this->columns as $column => $config) {
                if (isset($config['callback'])
                    && method_exists($this, $config['callback']))
                {
                    $params = [];
                    if (isset($config['callbackParameters'])) {
                        $params = $config['callbackParameters'];
                    }
                    $functionCall = $config['callback'];
                    $callbackValue = call_user_func(array($this, $functionCall), $interaction, $params);
                    if (isset($config['valuesAsColumns'])) {
                        $line[$interaction['id']] = array_merge($line[$interaction['id']], $callbackValue);
                    } else {
                        $line[$interaction['id']][$column] = $callbackValue;
                    }
                }
            }
        }
        $this->data = $line;
        $this->columns = $this->interactions = [];
        return $this;
    }
110841
public function startCLISession()
    {
        $cm = DI::getInjector()->getInstance(CacheManager::class);
        $this->session_cache = $cm->getCache('cli-session');
        $ref = &$this->session_cache->get();

        $GLOBALS['_SESSION'] = &$ref;

        // Make sure the session variables are available through this object
        $this->values = &$ref;
        $this->set('CLI', true);
        $this->active = true;
        return $this;
    }
1032696
public function inspect ()
  {
    if (!DebugConsole::$settings)
      throw new \RuntimeException ("Web console not initialized");
    foreach (func_get_args () as $arg)
      $this->inspectValue ($arg);
    return $this;
  }
919071
public function launch(array $inputs = array()) {
    $params = array('id' => $this->id);
    if(count($inputs) > 0) {
      $params['inputs'] = $inputs;
    }
    $this->executeCommand($this->_path_for_regex . '_launch', $params);
  }
506450
public function activateOptions() {
		try {
			$this->establishConnection();
		} catch (\PDOException $e) {
			$this->warn("Failed connecting to database. Closing appender. Error: " . $e->getMessage());
			$this->close();
			return;
		}

		// Parse the insert patterns; pattern parts are comma delimited
		$pieces = explode(',', $this->insertPattern);
		$converterMap = \n2n\log4php\layout\LayoutPattern::getDefaultConverterMap();
		foreach($pieces as $pattern) {
			$parser = new \n2n\log4php\pattern\PatternParser($pattern, $converterMap);
			$this->converters[] = $parser->parse(); 
		}
		
		$this->closed = false;
	}
1198936
public function tinker()
    {
        \Psy\Shell::debug([
            'browser' => $this,
            'driver' => $this->driver,
            'resolver' => $this->resolver,
            'page' => $this->page,
        ], $this);

        return $this;
    }
458184
protected function _execute()
    {
        $this->triggerBeforeFind();
        if ($this->__resultSet) {
            $decorator = $this->_decoratorClass();

            return new $decorator($this->__resultSet);
        }

        return $this->__resultSet = $this->_webservice->execute($this);
    }
124635
protected function triggerOnStartup(): AbstractApplication
    {
        foreach ($this->getModules() as $module) {
            if ($module instanceof StartupProviderInterface) {
                $module->onStartup(
                    $this->getServiceLocator()
                );
            }
        }

        return $this;
    }
951979
protected function startListening()
	{
		foreach ($this->eventsToListenFor as $event) {
			if (is_callable([$this, $event])) {
				$this->connection->eventManager()->bind($event, [$this, $event]);
			}
		}
		return $this;
	}
498706
public static function enable()
    {
        Builder::macro(self::MACRO_METHOD, function (Fluent $builder, callable $callback = null) {
            $tree = new static($builder);

            if (is_callable($callback)) {
                call_user_func($callback, $tree);
            }

            return $tree;
        });

        NestedSet::enable();
        MaterializedPath::enable();
        ClosureTable::enable();
    }
1185760
public static function enable()
    {
        Field::macro(self::MACRO_METHOD, function (Field $builder) {
            return new static($builder->getClassMetadata(), $builder->getName());
        });

        ManyToOne::macro(self::MACRO_METHOD, function (ManyToOne $builder) {
            return new static($builder->getClassMetadata(), $builder->getRelation());
        });
    }
437243
public function handleGetUpdates(): self
    {
        $get_updates_response = $this->telegram->handleGetUpdates();

        // Check if the user has set a custom callback for handling the response.
        if ($this->custom_get_updates_callback !== null) {
            $this->handleOutput(\call_user_func($this->custom_get_updates_callback, $get_updates_response));
        } else {
            $this->handleOutput($this->defaultGetUpdatesCallback($get_updates_response));
        }

        return $this;
    }
1136102
public final function do(): BatchInterface
    {
        // no need to get excited
        if (empty($this->queue)) {
            return $this;
        }

        // check transaction status
        $resource = $this->agent->getResource();
        /* if ($resource->getType() == Resource::TYPE_MYSQL_LINK) {
            // nope..
        } else */ if ($resource->getType() == Resource::TYPE_PGSQL_LINK) {
            $resource = $resource->getObject();
            $resourceStatus = pg_transaction_status($resource);
            if ($resourceStatus !== PGSQL_TRANSACTION_IDLE) do {
                time_nanosleep(0, 100000);
                $resourceStatus = pg_transaction_status($resource);
            } while ($resourceStatus === PGSQL_TRANSACTION_ACTIVE);
        }

        $startTime = microtime(true);

        $this->start(); // begin

        foreach ($this->queue as $query) {
            // @important (clone)
            $result = clone $this->agent->query($query);

            if ($result->getRowsAffected() > 0) {
                $this->results[] = $result;
            }

            unset($result);
        }

        $this->end(); // commit, go go go!

        $this->totalTime = (float) number_format(microtime(true) - $startTime, 10);

        $this->agent->getResult()->reset();

        return $this;
    }
291762
public function withAnyArgs()
    {
        $this->expectation->setMatchesCallback(function($name, $args) {
            if ($name == $this->methodName) {
                return true;
            } else {
                return false;
            }
        });

        $this->commentBuilder->setAnyArgs();
        
        return $this;
    }
1317230
public function callMe()
    {
        $output = $this->dispatchStartEvent();

        foreach ($this->parameters[static::PARAM_DATA] as $key => $string) {
            /** @var Model $model */
            $model = $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Model')
                ->setData($string)
                ->setName($key)
                ->setType(static::TYPE_REFLECTION);

            if ($key === static::META_COMMENT || $key === static::META_DECLARED_IN || $key === static::META_SOURCE) {
                $model->setNormal(static::UNKNOWN_VALUE);
                $model->setHasExtra(true);
            } else {
                $model->setNormal($string);
            }

            $output .= $this->pool->render->renderSingleChild(
                $this->dispatchEventWithModel(
                    __FUNCTION__ . static::EVENT_MARKER_END,
                    $model
                )
            );
        }

        return $output;
    }
769995
public function execute()
    {

        $DB = $this->getDBO();
        //Run the Query;
        $resultId = $DB->exec();
        //\Platform\Debugger::log($resultId);

        $this->setResultId($resultId)->setConnectionId($DB->getResourceId())->setAffectedRows($this->getAffectedRows());

        $DB->resetRun();

        return $this;
    }
298973
public function flip()
    {
        // get null valued data
        $unvaluedEntries = (clone $this)->filter(function ($value) {
            return !$value;
        })->keys();

        $collection = (clone $this)->filter();

        $this->setInternalValue(array_merge(array_flip($collection->toArray()), $unvaluedEntries->toArray()));

        return $this;
    }