Newscoop\Image\LocalImage::__construct PHP Method

__construct() public method

public __construct ( string $image = '' )
$image string
    public function __construct($image = '')
    {
        if (strpos($image, 'http://') === 0 || strpos($image, 'https://') === 0 || strpos($image, 'file://') === 0) {
            $this->location = self::LOCATION_REMOTE;
            $this->url = (string) $image;
        } else {
            $this->location = self::LOCATION_LOCAL;
            $this->basename = (string) $image;
        }
        $this->renditions = new ArrayCollection();
        $this->items = new ArrayCollection();
        $this->captions = new ArrayCollection();
    }