for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Class MyMySimpletext
*
* @filesource MyAwesomeModule.php
* @created 02.11.2015
* @package Example\MyModules
* @author Smiley <[email protected]>
* @copyright 2015 Smiley
* @license MIT
*/
namespace Example\MyModules;
use chillerlan\bbcode\Modules\ModuleInterface;
use Example\MyModules\MyAwesomeBaseModule;
* Transforms several simple text tags into HTML5 (custom)
class MyAwesomeModule extends MyAwesomeBaseModule implements ModuleInterface{
* An array of tags the module is able to process
* @var array
* @see \chillerlan\bbcode\Modules\Tagmap::$tags
protected $tags = ['mybbcode', 'somebbcode', 'whatever'];
* Transforms the bbcode, called from BaseModuleInterface
* @return string a transformed snippet
* @see \chillerlan\bbcode\Modules\BaseModuleInterface::transform()
* @internal
public function _transform(){
if(empty($this->content)){
return '';
}
return '<'.$this->tag.'>'.$this->content.'</'.$this->tag.'>';