private function loadImageFromURL($url)
    {
        $image = $this->fetchImageContentFromURL($url);

        if (empty($image)) {
            return;
        }

        if (Utils::isJPGResource($image)) {
            $this->filename = $url;
            $this->extension = 'jpg';
            $this->type = IMAGETYPE_JPEG;
        }

        if (Utils::isPNGResource($image)) {
            $this->filename = $url;
            $this->extension = 'png';
            $this->type = IMAGETYPE_PNG;
        }

        $this->from = 'external';
        $this->resource = imagecreatefromstring($image);
        $this->width = $this->boxWidth = imagesx($this->resource);
        $this->height = $this->boxHeight = imagesy($this->resource);
    }
private function loadImageFromURL($url)
    {
        $image = $this->fetchImageContentFromURL($url);

        if (empty($image)) {
            return;
        }

        if (Utils::isJPGResource($image)) {
            $this->filename = $url;
            $this->extension = 'jpg';
            $this->type = IMAGETYPE_JPEG;
        }

        if (Utils::isPNGResource($image)) {
            $this->filename = $url;
            $this->extension = 'png';
            $this->type = IMAGETYPE_PNG;
        }

        $this->from = 'external';
        $this->resource = imagecreatefromstring($image);
        $this->width = $this->boxWidth = imagesx($this->resource);
        $this->height = $this->boxHeight = imagesy($this->resource);
    }
private function loadImageFromURL ( $ url ) { $ image = $ this -> fetchImageContentFromURL ( $ url ) ; if ( empty ( $ image ) ) { return ; } if ( Utils :: isJPGResource ( $ image ) ) { $ this -> filename = $ url ; $ this -> extension = 'jpg' ; $ this -> type = IMAGETYPE_JPEG ; } if ( Utils :: isPNGResource ( $ image ) ) { $ this -> filename = $ url ; $ this -> extension = 'png' ; $ this -> type = IMAGETYPE_PNG ; } $ this -> from = 'external' ; $ this -> resource = imagecreatefromstring ( $ image ) ; $ this -> width = $ this -> boxWidth = imagesx ( $ this -> resource ) ; $ this -> height = $ this -> boxHeight = imagesy ( $ this -> resource ) ; }
Load an image from URL.

@param  string $url Image URL
@return void
Load an image from URL .