Model/ImageTemplate.php
public function addCommand($item)
    {
        if (!($item instanceof Command)) {
            if (is_array($item)) {
                try {
                    $item = new Command($item);
                } catch (\Exception $e) {
                    trigger_error('Could not auto-instantiate Command. ' . $e->getMessage(), E_USER_WARNING);
                }
            } else {
                trigger_error('Array parameter item is not of expected type "Command"!', E_USER_WARNING);
            }
        }
        $this->commands[] = $item;

        return $this;
    }
public function addCommand($item)
    {
        if (!($item instanceof Command)) {
            if (is_array($item)) {
                try {
                    $item = new Command($item);
                } catch (\Exception $e) {
                    trigger_error('Could not auto-instantiate Command. ' . $e->getMessage(), E_USER_WARNING);
                }
            } else {
                trigger_error('Array parameter item is not of expected type "Command"!', E_USER_WARNING);
            }
        }
        $this->commands[] = $item;

        return $this;
    }
public function addCommand ( $ item ) { if ( ! ( $ item instanceof Command ) ) { if ( is_array ( $ item ) ) { try { $ item = new Command ( $ item ) ; } catch ( \ Exception $ e ) { trigger_error ( 'Could not auto-instantiate Command. ' . $ e -> getMessage ( ) , E_USER_WARNING ) ; } } else { trigger_error ( 'Array parameter item is not of expected type "Command"!' , E_USER_WARNING ) ; } } $ this -> commands [ ] = $ item ; return $ this ; }
Adds an object of "Commands" of the ImageTemplate.

@param Command|array $item

@return ImageTemplate
Adds an object of Commands of the ImageTemplate .