Esempio n. 1
0
 /**
  * Add text and price data to search
  * @param null|string $content
  * @return null|string
  */
 public function generateSearchText($content)
 {
     $content = $this->_defaultData($content);
     $searchText = $this->_generateSearchText($content->text, $content->price);
     return parent::generateSearchText($searchText);
 }
 /**
  * @dataProvider provideTestParse
  */
 public function testCreate($expected, $string)
 {
     $this->assertSame($expected, String_::parse($string));
 }
Esempio n. 3
0
 /**
  * Encode l'url.
  *
  * @access private
  * @param string $url
  *
  * @return string
  */
 private function encodeUrl($lUrl)
 {
     $lUrl = String_::unaccents($lUrl);
     $lUrl = strtolower($lUrl);
     $lUrl = preg_replace('/([^.a-z\\/0-9]+)/i', '-', $lUrl);
     $lUrl = strtr($lUrl, '/', '-');
     return $lUrl;
 }