NAME
Yukki::Role::App - the role Yukki app-classes implement
VERSION
version 0.99_01
DESCRIPTION
The Yukki and Yukki::Web classes fulfill this role.
REQUIRED METHODS
model
my $obj = $self->model($name, \%params);
Given a name and an optional hash of parameters, return an instance of a Yukki::Model.
view
my $obj = $self->view($name);
Given a name, return a view object.
controller
my $obj = $self->controller($name);
Given a name, return a controller object.
locate
my $file = $self->locate($base_path, @path_parts);
Given a configuration key in $base_path
and some @path_parts
to append, return a Path::Class::File representing that file under the Yukki installation.
locate_dir
my $dir = $self->locate_dir($base_path, @path_parts);
Given a configuration key in $base_path
and some @path_parts
to append, return a Path::Class::Dir representing that directory under the Yukki installation.
check_access
my $access_is_ok = $self->check_access({
user => $user,
repository => $repository,
needs => $needs,
});
The user
is optional. It should be an object returned from Yukki::Model::User. The repository
is required and should be the name of the repository the user is trying to gain access to. The needs
is the access level the user needs. It must be an "AccessLevel" in Yukki::Types.
The method returns a true value if access should be granted or false otherwise.
AUTHOR
Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Qubling Software LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.