public static function transform($css, $options = array(), $transformEdgeInUrl = false) {
		if (!is_array($options)) {
			$options = array(
				'transformDirInUrl' => (bool)$options,
				'transformEdgeInUrl' => (bool)$transformEdgeInUrl,
			);
		}

		// Defaults
		$options += array(
			'transformDirInUrl' => false,
			'transformEdgeInUrl' => false,
		);

		// We wrap tokens in ` , not ~ like the original implementation does.
		// This was done because ` is not a legal character in CSS and can only
		// occur in URLs, where we escape it to %60 before inserting our tokens.
		$css = str_replace('`', '%60', $css);

		self::buildPatterns();

		// Tokenize single line rules with /* @noflip */
		$noFlipSingle = new CSSJanusTokenizer(self::$patterns['noflip_single'], '`NOFLIP_SINGLE`');
		$css = $noFlipSingle->tokenize($css);

		// Tokenize class rules with /* @noflip */
		$noFlipClass = new CSSJanusTokenizer(self::$patterns['noflip_class'], '`NOFLIP_CLASS`');
		$css = $noFlipClass->tokenize($css);

		// Tokenize comments
		$comments = new CSSJanusTokenizer(self::$patterns['comment'], '`C`');
		$css = $comments->tokenize($css);

		// LTR->RTL fixes start here
		$css = self::fixDirection($css);
		if ($options['transformDirInUrl']) {
			$css = self::fixLtrRtlInURL($css);
		}

		if ($options['transformEdgeInUrl']) {
			$css = self::fixLeftRightInURL($css);
		}
		$css = self::fixLeftAndRight($css);
		$css = self::fixCursorProperties($css);
		$css = self::fixFourPartNotation($css);
		$css = self::fixBorderRadius($css);
		$css = self::fixBackgroundPosition($css);
		$css = self::fixShadows($css);
		$css = self::fixTranslate($css);

		// Detokenize stuff we tokenized before
		$css = $comments->detokenize($css);
		$css = $noFlipClass->detokenize($css);
		$css = $noFlipSingle->detokenize($css);

		return $css;
	}