public function loadFrom($path)
    {
        // Avoid repeat load of broken images
        $hash = sha1($path);
        if ($this->hasFailed($hash, null)) {
            return $this;
        }

        // Handle resource
        $error = self::FAILED_UNKNOWN;
        try {
            $this->setImageResource($this->getImageManager()->make($path));
            $this->markSuccess($hash, null);
            $error = null;
        } catch (NotReadableException $ex) {
            // Handle unsupported image encoding on load (will be marked as failed)
            // Unsupported exceptions are handled without being raised as exceptions
            $error = self::FAILED_INVALID;
        } finally {
            if ($error) {
                $this->markFailed($hash, null, $error);
            }
        }

        return $this;
    }
public function loadFrom($path)
    {
        // Avoid repeat load of broken images
        $hash = sha1($path);
        if ($this->hasFailed($hash, null)) {
            return $this;
        }

        // Handle resource
        $error = self::FAILED_UNKNOWN;
        try {
            $this->setImageResource($this->getImageManager()->make($path));
            $this->markSuccess($hash, null);
            $error = null;
        } catch (NotReadableException $ex) {
            // Handle unsupported image encoding on load (will be marked as failed)
            // Unsupported exceptions are handled without being raised as exceptions
            $error = self::FAILED_INVALID;
        } finally {
            if ($error) {
                $this->markFailed($hash, null, $error);
            }
        }

        return $this;
    }
public function loadFrom ( $ path ) { // Avoid repeat load of broken images $ hash = sha1 ( $ path ) ; if ( $ this -> hasFailed ( $ hash , null ) ) { return $ this ; } // Handle resource $ error = self :: FAILED_UNKNOWN ; try { $ this -> setImageResource ( $ this -> getImageManager ( ) -> make ( $ path ) ) ; $ this -> markSuccess ( $ hash , null ) ; $ error = null ; } catch ( NotReadableException $ ex ) { // Handle unsupported image encoding on load (will be marked as failed) // Unsupported exceptions are handled without being raised as exceptions $ error = self :: FAILED_INVALID ; } finally { if ( $ error ) { $ this -> markFailed ( $ hash , null , $ error ) ; } } return $ this ; }
Populate the backend from a local path

@param string $path
@return $this
Populate the backend from a local path