2020-10-06 02:11:36 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
namespace podmanImageManager;
|
|
|
|
|
|
|
|
|
|
|
|
use objectStructs\objectStructs;
|
|
|
|
|
|
|
|
class imageAnnotations extends objectStructs
|
|
|
|
{
|
|
|
|
/** @var string */
|
|
|
|
public $purpose;
|
|
|
|
/** @var string */
|
|
|
|
public $hostController;
|
|
|
|
/** @var string */
|
|
|
|
public $clientController;
|
2020-12-04 21:00:36 -05:00
|
|
|
/** @var array Web, Database, php-fpm, etc roles that the container will play */
|
|
|
|
public $roles = array();
|
|
|
|
public function __construct($Result = null)
|
|
|
|
{
|
|
|
|
parent::__construct($Result);
|
|
|
|
if ($this->roles and empty($this->roles) )
|
|
|
|
{
|
2020-12-17 22:36:23 -05:00
|
|
|
$this->Log(__FUNCTION__ . " We have roles, lets explode");
|
2020-12-04 21:00:36 -05:00
|
|
|
$this->roles = explode(',',$this->roles);
|
|
|
|
}
|
|
|
|
}
|
2020-12-04 21:13:35 -05:00
|
|
|
|
|
|
|
public function hasRole( string $Role)
|
|
|
|
{
|
|
|
|
if (isset($this->roles[$Role]) )
|
|
|
|
return true;
|
|
|
|
elseif ( isset($this->roles[ucfirst($Role) ] ) )
|
|
|
|
return true;
|
|
|
|
else
|
|
|
|
return false;
|
|
|
|
}
|
2020-10-06 02:11:36 -04:00
|
|
|
}
|