Esempio n. 1
0
 /**
  * Cut an attribute's value to it's maximum length in the database.
  *
  * @param string $attributeName
  */
 public function cutAttributeLength($attributeName)
 {
     if (!empty($this->columns[$attributeName]['length']) && \GO\Base\Util\String::length($this->_attributes[$attributeName]) > $this->columns[$attributeName]['length']) {
         $this->_attributes[$attributeName] = \GO\Base\Util\String::substr($this->_attributes[$attributeName], 0, $this->columns[$attributeName]['length']);
     }
 }