private function fetchPlaceholder($placeholder)
    {
        try {
            $image = $this->imageClient->get($placeholder);
        } catch (RequestException $e) {
            // We couldn't fetch the file, fall back to default behaviour
            return false;
        }

        $filename = sprintf('placeholder_%s.jpg', substr(md5(microtime()), 0, 12));

        try {
            $this->filesystem->put('files://' . $filename, $image);
        } catch (IOException $e) {
            // We couldn't save the file, fall back to default behaviour
            return false;
        }

        return $filename;
    }
private function fetchPlaceholder($placeholder)
    {
        try {
            $image = $this->imageClient->get($placeholder);
        } catch (RequestException $e) {
            // We couldn't fetch the file, fall back to default behaviour
            return false;
        }

        $filename = sprintf('placeholder_%s.jpg', substr(md5(microtime()), 0, 12));

        try {
            $this->filesystem->put('files://' . $filename, $image);
        } catch (IOException $e) {
            // We couldn't save the file, fall back to default behaviour
            return false;
        }

        return $filename;
    }
private function fetchPlaceholder ( $ placeholder ) { try { $ image = $ this -> imageClient -> get ( $ placeholder ) ; } catch ( RequestException $ e ) { // We couldn't fetch the file, fall back to default behaviour return false ; } $ filename = sprintf ( 'placeholder_%s.jpg' , substr ( md5 ( microtime ( ) ) , 0 , 12 ) ) ; try { $ this -> filesystem -> put ( 'files://' . $ filename , $ image ) ; } catch ( IOException $ e ) { // We couldn't save the file, fall back to default behaviour return false ; } return $ filename ; }
Attempt to fetch a placeholder image from a remote URL.

@param string $placeholder

@return array|bool
Attempt to fetch a placeholder image from a remote URL .