mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
36 lines
848 B
PHP
36 lines
848 B
PHP
<?php
|
|
|
|
namespace Gazelle;
|
|
|
|
abstract class BaseUser extends BaseObject {
|
|
public function __construct(
|
|
protected User $user,
|
|
) {
|
|
parent::__construct($user->id);
|
|
}
|
|
|
|
/**
|
|
* A reference implementation for BaseObject::link().
|
|
* Derived BaseUser may redefine this if it makes sense.
|
|
*/
|
|
public function link(): string {
|
|
return $this->user->link();
|
|
}
|
|
|
|
/**
|
|
* A reference implementation for BaseObject::location().
|
|
* Derived BaseUser may redefine this if it makes sense.
|
|
*/
|
|
public function location(): string {
|
|
return $this->user->location();
|
|
}
|
|
|
|
/**
|
|
* The underlying User object. All public methods are available and
|
|
* the BaseUser object can modify() it as necessary.
|
|
*/
|
|
public function user(): User {
|
|
return $this->user;
|
|
}
|
|
}
|