src/Crossjoin/Css/Helper/Placeholder.php
protected static function addReplacement($string, $prefix)
    {
        if (is_string($string)) {
            if (is_string($prefix)) {
                $hash = md5(self::$counter);
                $placeholder = "_" . $prefix . "_" . $hash . "_";
                self::$replacements[$hash] = $string;
                self::$counter++;

                return $placeholder;
            } else {
                throw new \InvalidArgumentException(
                    "Invalid type '" . gettype($prefix). "' for argument 'prefix' given."
                );
            }
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($string). "' for argument 'string' given."
            );
        }
    }
protected static function addReplacement($string, $prefix)
    {
        if (is_string($string)) {
            if (is_string($prefix)) {
                $hash = md5(self::$counter);
                $placeholder = "_" . $prefix . "_" . $hash . "_";
                self::$replacements[$hash] = $string;
                self::$counter++;

                return $placeholder;
            } else {
                throw new \InvalidArgumentException(
                    "Invalid type '" . gettype($prefix). "' for argument 'prefix' given."
                );
            }
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($string). "' for argument 'string' given."
            );
        }
    }
protected static function addReplacement ( $ string , $ prefix ) { if ( is_string ( $ string ) ) { if ( is_string ( $ prefix ) ) { $ hash = md5 ( self :: $ counter ) ; $ placeholder = "_" . $ prefix . "_" . $ hash . "_" ; self :: $ replacements [ $ hash ] = $ string ; self :: $ counter ++ ; return $ placeholder ; } else { throw new \ InvalidArgumentException ( "Invalid type '" . gettype ( $ prefix ) . "' for argument 'prefix' given." ) ; } } else { throw new \ InvalidArgumentException ( "Invalid type '" . gettype ( $ string ) . "' for argument 'string' given." ) ; } }
Adds a replacement to the internal list.

@param string $string
@param string $prefix
@return string
Adds a replacement to the internal list .