/** * Get column type, either by its simpleType or userType. * * @return string */ public function getColumnType() { if (!($type = $this->links->get('simpleType'))) { $type = $this->links->get('userType'); } return $type; }
/** * get the comment of this object (without the hints for the exporter) * * @param boolean $asPhpComment add * infront of the lines and indent according to current indentation level * @return string */ protected function getComment($asPhpComment = true) { $comment = $this->parameters->get('comment'); // strip hints for mysql-exporter in comments (starting with {d:keyword} // or {doctrine:keyword} and ending with {/d:keyword} if ($comment = trim(preg_replace(sprintf('/\\{(%s):([^\\}]+)\\}(.+?)\\{\\/\\1:\\2\\}/si', $this->getDocument()->getFormatter()->getCommentParserIdentifierPrefix()), '', $comment))) { if ($asPhpComment) { // start the comment with a "*"" and add a " * " after each newline $comment = str_replace("\n", "\n * ", $comment); // comments are wrapped at 80 chars and will end with a newline $comment = ' * ' . wordwrap($comment, 77, "\n * ") . "\n *"; } return $comment; } }
/** * Get parameter value. * * @param string $key * @param mixed $default * @return mixed */ public function getParameter($key, $default = null) { return $this->parameters->get($key, $default); }