<?php

namespace idoit\Module\Customfields\Controller;

use idoit\Controller\Base as BaseController;
use idoit\Model\Dao\Base;
use idoit\Tree\Node;
use isys_application as Application;
use isys_component_tree as Tree;
use isys_controller as ControllerInterface;
use isys_module as Module;
use isys_register as Register;

class Main extends BaseController implements ControllerInterface
{
    protected $module;

    public function handle(Register $request, Application $application)
    {
        return null;
    }

    public function dao(Application $application)
    {
        return Base::instance($application->container->get('database'));
    }

    public function tree(Register $request, Application $application, Tree $tree)
    {
        return new Node('Node', '?');
    }

    public function __construct(Module $module)
    {
        $this->module = $module;
    }
}
