auto | normal | dpi

@param $val
351433
function set_background_image_resolution($val)
    {
        $parsed = $this->parse_image_resolution($val);

        $this->_prop_cache["background_image_resolution"] = null;
        $this->_props["background_image_resolution"] = $parsed;
    }
119234
protected function realToBinary($val)
    {
        $bdata = self::typeBytes("2", 3); // 2 is 0010, type indicator for reals
        return $bdata.strrev(pack("d", (float)$val));
    }
419251
function type($val) {
		switch (gettype($val)) {
			case 'NULL':
				return \PDO::PARAM_NULL;
			case 'boolean':
				return \PDO::PARAM_BOOL;
			case 'integer':
				return \PDO::PARAM_INT;
			case 'resource':
				return \PDO::PARAM_LOB;
			case 'float':
				return self::PARAM_FLOAT;
			default:
				return \PDO::PARAM_STR;
		}
	}
954844
public static function min($val, $min)
	{
	    if (is_array($min)) {
	        if (!isset($min['min'])) {
	            throw new \InvalidArgumentException('The $min argument must have "min" key');
	        }
	        $min= $min['min'];
	    }

	    return $val >= $min;
	}
802467
public function setDPI($dpi) {
        if(is_int($dpi)) {
            $this->dpi = max(1, $dpi);
        } else {
            $this->dpi = null;
        }
    }
1157770
protected function Sub( $val )
	{
		if ( ! $val instanceof ValueProxy ) throw new \InvalidArgumentException();
		return new IntProxy( $this->_value - $val->getValue() );
	}
1048827
public static function gauge($val, $floor = 0)
    {
        $colors = self::getGaugeColors();
        $key_size =    100 / count($colors);
        $key = floor($val / $key_size);
        return (array_key_exists((int) $key, $colors)) ? $colors[$key] : end($colors);
    }
815333
public function initFromInteger($value)
    {
        $a = ($value >> 24) & 0xFF;
        $r = ($value >> 16) & 0xFF;
        $g = ($value >> 8) & 0xFF;
        $b = $value & 0xFF;
        $a = $this->rgb2alpha($a);

        $this->setPixel($r, $g, $b, $a);
    }
24602
protected function IDiv( $val )
	{
		return Integer::FromValue( floor( Convert::ToInt( $this->_value /  Convert::ToInt16( $val->getValue() ) ) ) );
	}
273800
public static function isLuhn($val = null)
    {
        if (is_null($val)) {
            return null;
        }
        $_num = substr($val, 0, strlen($val)-1);
        return (bool) (intval($val) == intval($_num.self::getLuhnKey($_num)));
    }
1010424
function set_background($val)
    {
        $val = trim($val);
        $important = isset($this->_important_props["background"]);

        if ($val === "none") {
            $this->_set_style("background_image", "none", $important);
            $this->_set_style("background_color", "transparent", $important);
        } else {
            $pos = array();
            $tmp = preg_replace("/\s*\,\s*/", ",", $val); // when rgb() has spaces
            $tmp = preg_split("/\s+/", $tmp);

            foreach ($tmp as $attr) {
                if (mb_substr($attr, 0, 3) === "url" || $attr === "none") {
                    $this->_set_style("background_image", $this->_image($attr), $important);
                } elseif ($attr === "fixed" || $attr === "scroll") {
                    $this->_set_style("background_attachment", $attr, $important);
                } elseif ($attr === "repeat" || $attr === "repeat-x" || $attr === "repeat-y" || $attr === "no-repeat") {
                    $this->_set_style("background_repeat", $attr, $important);
                } elseif (($col = $this->munge_color($attr)) != null) {
                    $this->_set_style("background_color", is_array($col) ? $col["hex"] : $col, $important);
                } else {
                    $pos[] = $attr;
                }
            }

            if (count($pos)) {
                $this->_set_style("background_position", implode(" ", $pos), $important);
            }
        }

        //see __set and __get, on all assignments clear cache, not needed on direct set through __set
        $this->_prop_cache["background"] = null;
        $this->_props["background"] = $val;
    }
163807
public function writeDebugLog( $val ) {
		if ( $this->debugMode === false ) {
			return;
		}

		$this->runlog .= $this->getLogSection() . '> '
			. $val
			. "\n";
	}
561953
public function val($val = null) {
		$val = (int) $val;
		if ($val) {
			if (is_numeric($val) && is_int($val*1)) {
				if (in_array($this->sources[$val],$this->sources)) {
					$this->val = $val;
					return $this->val;
				}
			} else {
				throw new \SimplOn\DataValidationException($this->valudationNaN);
			}
		} else {
			return $this->val;
		}
	}
856060
private double normalize(int d, double val) {
    d = (mean.length == 1) ? 0 : d;
    return (val - mean[d]) / stddev[d];
  }
696553
protected function Eq( $val )
	{
		if  (! $val->getIsNumeric() ) return false;
		return  $this->ToInt( null ) == $val->ToInt( null );
	}
353481
public static function accepted($val): bool
    {
        if (!\is_scalar($val)) {
            return false;
        }

        return false !== \stripos(Helper::IS_TRUE, '|' . $val . '|');
    }
1338787
public static function isEmpty($val): bool
    {
        if (\is_string($val)) {
            $val = \trim($val);

        } elseif (\is_object($val)) {
            $val = \get_object_vars($val);
        }

        return $val === '' || $val === null || $val === [];
    }