src/View/Helper/QrCodeHelper.php
public function formatText($text, $type = null) {
		switch ($type) {
			case 'text':
				break;
			case 'url':
				$text = $this->Url->build($text, true);
				break;
			case 'sms':
				$text = 'smsto:' . implode(':', (array)$text);
				break;
			case 'tel':
				$text = 'tel:' . $text;
				break;
			case 'email':
				$text = 'mailto:' . $text;
				break;
			case 'geo':
				$text = 'geo:' . implode(',', (array)$text); #like 77.1,11.8
				break;
			case 'market':
				$text = 'market://search?q=pname:' . $text;
		}
		return $text;
	}
public function formatText($text, $type = null) {
		switch ($type) {
			case 'text':
				break;
			case 'url':
				$text = $this->Url->build($text, true);
				break;
			case 'sms':
				$text = 'smsto:' . implode(':', (array)$text);
				break;
			case 'tel':
				$text = 'tel:' . $text;
				break;
			case 'email':
				$text = 'mailto:' . $text;
				break;
			case 'geo':
				$text = 'geo:' . implode(',', (array)$text); #like 77.1,11.8
				break;
			case 'market':
				$text = 'market://search?q=pname:' . $text;
		}
		return $text;
	}
public function formatText ( $ text , $ type = null ) { switch ( $ type ) { case 'text' : break ; case 'url' : $ text = $ this -> Url -> build ( $ text , true ) ; break ; case 'sms' : $ text = 'smsto:' . implode ( ':' , ( array ) $ text ) ; break ; case 'tel' : $ text = 'tel:' . $ text ; break ; case 'email' : $ text = 'mailto:' . $ text ; break ; case 'geo' : $ text = 'geo:' . implode ( ',' , ( array ) $ text ) ; #like 77.1,11.8 break ; case 'market' : $ text = 'market://search?q=pname:' . $ text ; } return $ text ; }
Format a text in a specific format
- url, sms, tel, email, market, geo

@param string|array $text
@param string|null $type
@return string formattedText
Format a text in a specific format - url sms tel email market geo