object are good
This commit is contained in:
parent
d42d8c8e25
commit
9cbb5f7f95
17
image.php
17
image.php
|
@ -15,10 +15,12 @@ class image extends objectStructs
|
|||
public $image;
|
||||
|
||||
public function __construct($vars)
|
||||
{
|
||||
if (is_array($vars))
|
||||
{
|
||||
$this->imageName = (isset($vars['image']) ? $vars['image'] :
|
||||
(isset($vars['name']) ? $vars['name'] :
|
||||
(iiset($vars['imageName'] ? $vars['imageName'] : "" ) ) ) ) ;
|
||||
(isset($vars['imageName']) ? $vars['imageName'] : "" ) ) ) ;
|
||||
if (isset( $vars['imageBasic']->annotations) )
|
||||
$annotations = $vars['imageBasic']->annotations;
|
||||
elseif (isset($vars['annotations']))
|
||||
|
@ -28,6 +30,19 @@ class image extends objectStructs
|
|||
if (isset($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()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue