diff lib/IMPL/Security/Principal.pm @ 407:c6e90e02dd17 ref20150831

renamed Lib->lib
author cin
date Fri, 04 Sep 2015 19:40:23 +0300
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/IMPL/Security/Principal.pm	Fri Sep 04 19:40:23 2015 +0300
@@ -0,0 +1,60 @@
+package IMPL::Security::Principal;
+use strict;
+use warnings;
+
+use IMPL::Const qw(:prop);
+use IMPL::require {
+    AbstractPrincipal => 'IMPL::Security::AbstractPrincipal'
+};
+use IMPL::declare {
+    base => [
+        'IMPL::Object' => undef,
+        'IMPL::Object::Autofill' => '@_',
+        'IMPL::Security::AbstractPrincipal' => undef
+    ],
+    props => [
+        @{AbstractPrincipal->abstractProps()},
+        isNobody => PROP_RW
+    ]
+};
+
+__PACKAGE__->abstractProps([]);
+
+my $nobody;
+
+sub nobody {
+    $nobody = $_[0]->new(name => 'nobody', description => '', isNobody => 1) unless $nobody;
+    return $nobody;
+}
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+C<IMPL::Security::Principal> Идентификатор пользователя
+
+C<[Autofill]>
+
+=head1 MEMBERS
+
+=over
+
+=item C<CTOR(%props)>
+
+Создает новый объект.
+
+=item C<[get] name>
+
+Возвращает имя пользователя.
+
+=item C<[get,set] description>
+
+Возвращает описание пользователя.
+
+=back
+
+=cut