public static function createFromResource(Resource $resource, array $options = [])
    {
        $entity = new self();

        $entity->applyResource($resource);

        return $entity;
    }
public static function createFromResource(Resource $resource, array $options = [])
    {
        $entity = new self();

        $entity->applyResource($resource);

        return $entity;
    }
public static function createFromResource ( Resource $ resource , array $ options = [ ] ) { $ entity = new self ( ) ; $ entity -> applyResource ( $ resource ) ; return $ entity ; }
Creates a instance if the current entity with the values of a resouce

@param \Muffin\Webservice\Model\Resource $resource The resource to apply the properties from
@param array $options The options to pass to the constructor
@return self
Creates a instance if the current entity with the values of a resouce