/** * Sets the image and its attributes from an html image * * @param str The html image * */ protected function imageFromHtml($value) { // retrieves only the image $htmlImage = trim(strip_tags($value, '<img>')); $this->image = $htmlImage; // Retrieves all attributes from the image $this->attributes = w3sCommonFunctions::stringToArray($this->image); $this->attributes["fullImagePath"] = sfConfig::get('sf_web_dir') . $this->attributes['src']; $this->attributes["linkedTo"] = w3sCommonFunctions::getTagAttribute(trim(strip_tags($value, '<a>')), 'href'); $this->setImageAttributes(); }