public function testBasicStripTags() { $test = <<<START <div>Lorem <span>ipsum</span> dolor <a href="test">sic</a> amet.</div> START; $this->assertEquals(strip_tags($test), StringUtils::stripTags($test)); $this->assertEquals('Lorem ipsum dolor sic amet.', StringUtils::stripTags($test)); }
public static function d() { $aRgs = func_get_args(); $output = ''; for ($i = 0; $i < ob_get_level(); $i++) { // cleaning the buffers ob_end_clean(); } if (!self::isCLi() && self::getEnv()->getHttpRequest()->accepts('application/json')) { $output = json_encode($aRgs); } elseif (self::isCLi() || self::getEnv()->getHttpRequest()->accepts('text/html')) { foreach ($aRgs as $object) { ob_start(); var_dump($object); $output .= ob_get_clean(); if (!self::isCli()) { $output .= '<hr/>' . "\n"; } } } if (!stristr($_SERVER['PHP_SELF'], 'phpunit')) { ob_start(); debug_print_backtrace(); $output .= ob_get_clean(); if (self::isCLi() || self::getEnv()->getHttpRequest()->accepts('application/json')) { echo StringUtils::stripTags(StringUtils::br2nl($output)); } elseif (self::getEnv()->getHttpRequest()->accepts('text/html')) { echo '<pre>' . $output . '</pre>'; } else { echo StringUtils::stripTags(StringUtils::br2nl($output)); } exit; } else { return $output; } }
<?php use vsc\infrastructure\StringUtils; use vsc\infrastructure\vsc; use vsc\Exception; /* @var $this \vsc\presentation\views\PlainTextView */ ?> Default TXT template This is the default txt template from the <?php echo StringUtils::stripTags(vsc::name()); ?> framework. In order to add content, you need to: - add the <?php echo $this->getViewFolder(); ?> folder in your module's template folder: <?php echo $this->getMap()->getTemplatePath(); ?> - add the default template <?php echo $this->getTemplate(); ?> These settings are defined in one of the following files: <?php foreach (get_included_files() as $sFileName) {