<commit_before><?php

namespace Command;

use Database\Connect;
use Config\Config;

class getData
{
    /**
     * setData constructor.
     *
     * @param \Aura\Web\Request $request
     * @param \Aura\Web\Response $response
     * @param \Aura\View\View $view
     */
    public function __construct($request, $response, $view)
    {
        $status = 'success';
        $message = '';

        $secureToken = (new Config)->getConfig()['secure_token'];
        $retrievedSecureToken = $request->query->get('key', '');

        if ($secureToken !== $retrievedSecureToken) {
            $status = 'error';
            $message = 'Incorrect secure token.';
        } else {
            $post = $request->post;


        }

        $view->setData([
            'status' => $status,
            'message' => $message,
        ]);

        $response->content->set($view->__invoke());
    }
}<commit_msg>Added  some base logic to command get<commit_after><?php

namespace Command;

use Database\Connect;
use Config\Config;

class getData
{
    /**
     * setData constructor.
     *
     * @param \Aura\Web\Request $request
     * @param \Aura\Web\Response $response
     * @param \Aura\View\View $view
     */
    public function __construct($request, $response, $view)
    {
        $status = 'success';
        $message = '';

        $secureToken = (new Config)->getConfig()['secure_token'];
        $retrievedSecureToken = $request->query->get('key', '');
        $host = $request->query->get('host', '');

        if ($secureToken !== $retrievedSecureToken) {
            $status = 'error';
            $message = 'Incorrect secure token.';
        } else {
            $post = $request->post;


        }

        $view->setData([
            'status' => $status,
            'message' => $message,
        ]);

        $response->content->set($view->__invoke());
    }

    protected function _getCommands($host)
    {
        $query = (new\Database\Query)
            ->select()
            ->from('commands')
            ->cols([
                'command_id',
                'command',
                'to_be_exec',
            ])
            ->where('executed = 0')
            ->where('consumed = 0')
            ->where("host = '$host'");

        return (new Connect)->query($query);
    }
}
{'fraction_non_alphanumeric': 0.1633362293657689, 'fraction_numerical': 0.0008688097306689834, 'mean_word_length': 1.8362068965517242, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2847955', 'n_tokens_mistral': 684, 'n_tokens_neox': 664, 'n_words': 130}