<commit_before><?php
namespace Meling;

/**
 * Управление документом
 * Class Document
 *
 * @package Meling
 */
class Document
{
    /**
     * @var \Meling\Document\Builder
     * @version 1.0
     */
    protected $builder;

    /**
     * Document constructor.
     *
     * @param \PHPixie\Template $template
     * @version 1.0
     */
    public function __construct($template)
    {
        $this->builder = $this->buildBuilder($template);
    }

    /**
     * Возвращает Ссылки страницы
     *
     * @return \Meling\Document\Links
     * @version 1.0
     */
    public function links()
    {
        return $this->builder->links();
    }<commit_msg>Override Template in Document constructor<commit_after><?php
namespace Meling;

/**
 * Управление документом
 * Class Document
 *
 * @package Meling
 */
class Document
{
    /**
     * @var \Meling\Document\Builder
     * @version 1.0
     */
    protected $builder;

    /**
     * Document constructor.
     *
     * @param \PHPixie\Template $template
     * @version 1.0
     */
    public function __construct($template = null)
    {
        if($template === null){
            $slice             = new \PHPixie\Slice();
            $filesystem        = new \PHPixie\Filesystem();
            $locatorConfig     = $slice->arrayData(array(
                'directory' => 'assets/layouts'
            ));
            $root              = $filesystem->root(dirname(dirname(dirname(__DIR__))));
            var_dump($root->path());die;
            $filesystemLocator = $filesystem->buildlocator($locatorConfig, $root);
            $template          = new \PHPixie\Template($slice, $filesystemLocator, $slice->arrayData());
        }
        $this->builder = $this->buildBuilder($template);
    }

    /**
     * Возвращает Ссылки страницы
     *
     * @return \Meling\Document\Links
     * @version 1.0
     */
    public function links()
    {
        return $this->builder->links();
    }
{'fraction_non_alphanumeric': 0.13927291346646187, 'fraction_numerical': 0.006144393241167435, 'mean_word_length': 1.9295352323838082, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '3184336', 'n_tokens_mistral': 593, 'n_tokens_neox': 592, 'n_words': 110}