Beispiel #1
0
 /**
  * Render a view wrapped in <a> tag
  * 
  * @param mixed  $email    Email or an array of preg matches
  * @param string $url_base Base URI
  * @param array  $vars     View params
  * @return string HTML
  * @deprecated 1.1.
  */
 public static function renderEmailHTML($email, $url_base = '', $vars = array())
 {
     $vars['class'] = 'extractor-email';
     $extractor = new Extractor();
     return $extractor->linkifyQualifier(Qualifier::TYPE_EMAIL, $email, $url_base, $vars);
 }
Beispiel #2
0
 /**
  * @covers ::linkifyEmails
  * @covers ::pregReplaceEmailCallback
  * @dataProvider providerLinkifyEmails
  */
 public function testLinkifyEmails($input, $output)
 {
     $this->assertEquals($this->object->linkifyEmails($input), $output);
 }
Beispiel #3
0
/**
 * Extract URLs, emails, hashtags and usernames form text
 * 
 * @param string $text Source text
 * @return array
 */
function hypeapps_extract_tokens($text)
{
    return \hypeJunction\Scraper\Extractor::all($text);
}