1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59:
<?php
namespace SAREhub\Client\User;
/**
* Base user class
*
*/
class User
{
/**
* @var array
*/
private $keys;
/**
* @param array $keys
*/
public function __construct(array $keys = null)
{
$this->keys = $keys ? $keys : [];
}
/**
* @param string $type
* @return mixed|null
*/
public function getKey($type)
{
return $this->hasKey($type) ? $this->keys[$type] : null;
}
/**
* @param string $type
* @return bool
*/
public function hasKey($type)
{
return isset($this->keys[$type]);
}
/**
* @param string $type
* @param mixed $value
*/
public function setKey($type, $value)
{
$this->keys[$type] = $value;
}
/**
* @return string[]
*/
public function getKeys()
{
return $this->keys;
}
}