示例#1
0
 /**
  * Format value.
  *
  * @access   public
  * @param    string $value
  * @return   string
  * @since    1.0.0-alpha
  * @version  1.0.0-alpha
  */
 public function format($value)
 {
     if ($this->bStripTags) {
         $value = strip_tags($value);
     }
     if ($this->substringLength > 0) {
         if ($this->bSaveWords === FALSE) {
             $value = substr($value, 0, $this->substringLength);
         } else {
             $value = Helper\String::substrWords($value, $this->substringLength, $this->sEndSubstrWith);
         }
     }
     return $this->sPrefix . $value . $this->sSuffix;
 }
示例#2
0
 /**
  * @access     public
  * @param    string $sValue
  * @return    Controller
  * @since      1.0.0-alpha
  * @version    1.0.0-alpha
  */
 public function setDescription($sValue)
 {
     $this->addMetaTagRegular('description', StringHelper::substrWords($sValue, 155));
     return $this;
 }