Cviebrock\ImageValidator\ImageValidator::getImagePath PHP Method

getImagePath() protected method

protected getImagePath ( $value )
    protected function getImagePath($value)
    {
        // if were passed an instance of UploadedFile, return the path
        if ($value instanceof UploadedFile) {
            return $value->getPathname();
        }
        // if we're passed a PHP file upload array, return the "tmp_name"
        if (is_array($value) && array_get($value, 'tmp_name') !== null) {
            return $value['tmp_name'];
        }
        // fallback: we were likely passed a path already
        return $value;
    }