diff options
Diffstat (limited to 'app/frontend/dto/UserKeyDTO.php')
-rw-r--r-- | app/frontend/dto/UserKeyDTO.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/frontend/dto/UserKeyDTO.php b/app/frontend/dto/UserKeyDTO.php new file mode 100644 index 0000000..1dbca8e --- /dev/null +++ b/app/frontend/dto/UserKeyDTO.php @@ -0,0 +1,26 @@ +<?php + +Prado::using('Application.dto.BaseDTO'); +Prado::using('Application.model.UserAuthKey'); + +class UserKeyDTO extends BaseDTO { + + public $User; + public $Key; + public $IPAddress; + + public function loadRecord(UserAuthKey $record) { + if ($record->User) { + $this->User = $record->User->Login; + } + $this->Key = $record->AuthKey; + $this->IPAddress = $record->IPAddress; + } + + public static function __compare(UserKeyDTO $dto1, UserKeyDTO $dto2) { + return strcmp($dto1->Key, $dto2->Key); + } + +} + +?> |