public function setName($name) { if (strlen(trim($name)) > 0) { $this->name = YMarket::specialChars($name); return true; } else { return false; } }
protected function getProp($data) { $tmp = ''; if (is_array($data)) { foreach ($data as $key => $value) { if (is_array($value)) { $tmp .= $this->getProp($value); } else { if (strlen(trim($value)) > 0) { $tmp .= "<{$key}>" . YMarket::specialChars(trim($value)) . "</{$key}>\r\n"; } } } } return $tmp; }