public static function createImageSetFromPostValues($postValues)
    {
        if (isset($postValues['title'], $postValues['width'], $postValues['height'], $postValues['method'])) {
            $imageSetObject = new \stdClass();

            $imageSetObject->title = $postValues['title'];
            $imageSetObject->slug = StringUtil::slugify($postValues['title']);
            $imageSetObject->width = $postValues['width'];
            $imageSetObject->height = $postValues['height'];
            $imageSetObject->method = $postValues['method'];

            return $imageSetObject;
        } else {
            throw new \Exception('Trying to create image set with invalid data.');
        }
    }
public static function createImageSetFromPostValues($postValues)
    {
        if (isset($postValues['title'], $postValues['width'], $postValues['height'], $postValues['method'])) {
            $imageSetObject = new \stdClass();

            $imageSetObject->title = $postValues['title'];
            $imageSetObject->slug = StringUtil::slugify($postValues['title']);
            $imageSetObject->width = $postValues['width'];
            $imageSetObject->height = $postValues['height'];
            $imageSetObject->method = $postValues['method'];

            return $imageSetObject;
        } else {
            throw new \Exception('Trying to create image set with invalid data.');
        }
    }
public static function createImageSetFromPostValues ( $ postValues ) { if ( isset ( $ postValues [ 'title' ] , $ postValues [ 'width' ] , $ postValues [ 'height' ] , $ postValues [ 'method' ] ) ) { $ imageSetObject = new \ stdClass ( ) ; $ imageSetObject -> title = $ postValues [ 'title' ] ; $ imageSetObject -> slug = StringUtil :: slugify ( $ postValues [ 'title' ] ) ; $ imageSetObject -> width = $ postValues [ 'width' ] ; $ imageSetObject -> height = $ postValues [ 'height' ] ; $ imageSetObject -> method = $ postValues [ 'method' ] ; return $ imageSetObject ; } else { throw new \ Exception ( 'Trying to create image set with invalid data.' ) ; } }
Ceate image set from post values

@param $postValues

@return \stdClass
@throws \Exception
Ceate image set from post values