object are good

This commit is contained in:
sbyrd 2020-12-01 21:31:19 -05:00
parent d42d8c8e25
commit 9cbb5f7f95
1 changed files with 24 additions and 9 deletions

View File

@ -16,17 +16,32 @@ class image extends objectStructs
public function __construct($vars) public function __construct($vars)
{ {
$this->imageName = (isset($vars['image']) ? $vars['image'] : if (is_array($vars))
(isset($vars['name']) ? $vars['name'] : {
(iiset($vars['imageName'] ? $vars['imageName'] : "" ) ) ) ) ; $this->imageName = (isset($vars['image']) ? $vars['image'] :
if (isset( $vars['imageBasic']->annotations) ) (isset($vars['name']) ? $vars['name'] :
$annotations = $vars['imageBasic']->annotations; (isset($vars['imageName']) ? $vars['imageName'] : "" ) ) ) ;
elseif (isset($vars['annotations'])) if (isset( $vars['imageBasic']->annotations) )
$annotations = $vars['annotations']; $annotations = $vars['imageBasic']->annotations;
elseif (isset($vars['annotations']))
$annotations = $vars['annotations'];
$this->annotations = new imageAnnotations($annotations); $this->annotations = new imageAnnotations($annotations);
if (isset($vars['imageConfig'])) if (isset($vars['imageConfig']))
$this->config = new imageConfig($vars['imageConfig']); $this->config = new imageConfig($vars['imageConfig']);
}
elseif (is_object($vars))
{
$this->imageName = (isset($vars->image ) ? $vars->image :
(isset($vars->name) ? $vars->name :
(isset($vars->imageName) ? $vars->imageName : "" ) ) ) ;
if (isset( $vars->imageBasic->annotations) )
$annotations = $vars['imageBasic']->annotations;
elseif (isset($vars['annotations']))
$annotations = $vars['annotations'];
}
} }
public function getHostControllerName() public function getHostControllerName()