public function add($input_data)
    {
        $data['inputs'] = [];

        if (is_array($input_data)) {
            foreach ($input_data as $image) {
                $data['inputs'][] = $this->addNewImage($image);
            }
        } else {
            $data['inputs'][] = $this->addNewImage($input_data);
        }

        $inputResult = $this->getRequest()->request(
            'POST',
            $this->getRequestUrl('inputs'),
            $data
        );

        return $this->getInputsFromResult($inputResult);
    }
public function add($input_data)
    {
        $data['inputs'] = [];

        if (is_array($input_data)) {
            foreach ($input_data as $image) {
                $data['inputs'][] = $this->addNewImage($image);
            }
        } else {
            $data['inputs'][] = $this->addNewImage($input_data);
        }

        $inputResult = $this->getRequest()->request(
            'POST',
            $this->getRequestUrl('inputs'),
            $data
        );

        return $this->getInputsFromResult($inputResult);
    }
public function add ( $ input_data ) { $ data [ 'inputs' ] = [ ] ; if ( is_array ( $ input_data ) ) { foreach ( $ input_data as $ image ) { $ data [ 'inputs' ] [ ] = $ this -> addNewImage ( $ image ) ; } } else { $ data [ 'inputs' ] [ ] = $ this -> addNewImage ( $ input_data ) ; } $ inputResult = $ this -> getRequest ( ) -> request ( 'POST' , $ this -> getRequestUrl ( 'inputs' ) , $ data ) ; return $ this -> getInputsFromResult ( $ inputResult ) ; }
Add Input Method

@param $input_data

@return array

@throws \Exception
Add Input Method