<commit_before><?php
require("vendor/autoload.php");
//So we can use the namespace endpoint factory
require("src/Endpoints/v1_0/helloworld.php");

use LunixREST\AccessControl\PublicAccessControl;
use LunixREST\Endpoint\NamespaceEndpointFactory;
use LunixREST\Request\RequestFactory\BasicRequestFactory;
use LunixREST\Response\DefaultResponseFactory;
use LunixREST\Server\HTTPServer;
use LunixREST\Server\Server;
use LunixREST\Throttle\NoThrottle;

//The public key "public" gives access to everything
$accessControl = new PublicAccessControl("public");

//Don't throttle requests
$throttle = new NoThrottle();

//Lets support the default response types (JSON)
$responseFactory = new DefaultResponseFactory();

//Load any endpoints from the namespace listed
$endpointFactory = new NamespaceEndpointFactory("\\HelloWorld\\Endpoints");

$server = new Server($accessControl, $throttle, $responseFactory, $endpointFactory);

//Build a basic url decoding body handler, which includes the basic url parser (which determines the url format)<commit_msg>update hello world example based on changes to public access control<commit_after><?php
require("vendor/autoload.php");
//So we can use the namespace endpoint factory
require("src/Endpoints/v1_0/helloworld.php");

use LunixREST\AccessControl\PublicAccessControl;
use LunixREST\Endpoint\NamespaceEndpointFactory;
use LunixREST\Request\RequestFactory\BasicRequestFactory;
use LunixREST\Response\DefaultResponseFactory;
use LunixREST\Server\HTTPServer;
use LunixREST\Server\Server;
use LunixREST\Throttle\NoThrottle;

//Ignore whatever key is passed and give access anyway
$accessControl = new PublicAccessControl();

//Don't throttle requests
$throttle = new NoThrottle();

//Lets support the default response types (JSON)
$responseFactory = new DefaultResponseFactory();

//Load any endpoints from the namespace listed
$endpointFactory = new NamespaceEndpointFactory("\\HelloWorld\\Endpoints");

$server = new Server($accessControl, $throttle, $responseFactory, $endpointFactory);

//Build a basic url decoding body handler, which includes the basic url parser (which determines the url format)
{'fraction_non_alphanumeric': 0.09452503509592887, 'fraction_numerical': 0.0018717828731867104, 'mean_word_length': 6.635714285714286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '7562557', 'n_tokens_mistral': 609, 'n_tokens_neox': 578, 'n_words': 182}