<?php     
defined('C5_EXECUTE') or die("Access Denied.");

/**
 * Magic Data by John Liddiard (aka JohntheFish)
 * www.jlunderwater.co.uk, www.c5magic.co.uk
 * This software is licensed under the terms described in the concrete5.org marketplace.
 * Please find the add-on there for the latest license copy.
 */


if (!class_exists('MagicDataSymbolsYarrPirateSpeak')){
Loader::library('magic_data/symbol_plugin_base', 'jl_magic_data');
class MagicDataSymbolsYarrPirateSpeak extends MagicDataSymbolPluginBase {

	public function getSymbol() {
		return 'YARR_PIRATE_SPEAK';
	}

	public function getDescription() {
		return t('Translate yer text t\' Pirate Speak.');
	}
	public function getHelp() {
		return t('Takes the result of preceding symbols as text and translates that text into pirate speak.');
	}

	public function processSymbol ($text, &$params){
		$psh = Loader::helper('pirate_speak', 'jl_pirate_speak');
		
		/*
		Note 'false' parameter to make sure MD is not auto-evaluated within the pirate speak.
		*/
		$text = $psh->yarr($text, false);
		return $text;
	}


}
}
