podmanImageManager/imageAnnotations.php

40 lines
1010 B
PHP

<?php
namespace podmanImageManager;
use objectStructs\objectStructs;
class imageAnnotations extends objectStructs
{
/** @var string */
public $purpose;
/** @var string */
public $hostController;
/** @var string */
public $clientController;
/** @var array Web, Database, php-fpm, etc roles that the container will play */
public $roles = array();
public function __construct($Result = null)
{
parent::__construct($Result);
$this->Log(__FUNCTION__ . " Load imageAnnotations with".print_r($Result,true));
if ($this->roles and empty($this->roles) )
{
$this->Log(__FUNCTION__ . " We have roles, lets explode");
$this->roles = explode(',',$this->roles);
}
}
public function hasRole( string $Role)
{
if (isset($this->roles[$Role]) )
return true;
elseif ( isset($this->roles[ucfirst($Role) ] ) )
return true;
else
return false;
}
}