![]() |
![]()
| ![]() |
![]()
DESCRIPTIONNot intended for direct use. Please use OpenXPKI::Client::UI::Response::DTO instead. METHODSresolveReturns a HashRef with all attribute values (if they are set). If an attribute value is itself an object that consumes "OpenXPKI::Client::UI::Response::DTORole" (or an ArrayRef containing such objects) the attribute value is transformed first. So a call to "transform" may lead to recursive calls of the same method in children (i.e. attributes of the current object) and so on. Per default, the attribute name is used as hash key. To override this the Moose attribute parameter documentation may be used. Nested hash structures as output may be defined using slashes "I" as delimiter. A trailing slash is a shortcut and means: append the attribute name. package Example; use Moose; with 'OpenXPKI::Client::UI::Response::DTORole'; has 'descr' => (is => 'rw', isa => 'Str', documentation => 'description'); has 'label' => (is => 'rw', isa => 'Str', documentation => 'meta/title'); has 'size' => (is => 'rw', isa => 'Str', documentation => 'meta/sub/'); # Elsewhere: my $response = Example->new( descr => 'abc', label => 'info', size => 23, )->resolve; # { # description => 'abc', # meta => { # title => 'info', # sub => { # size => 23, # }, # }, # } is_setReturns 1 if any attributes of the consuming object have a value set (also if a "default" was specified). Should be overridden if required.
|