/** * Create header. * * @param int $level header level (1-6) */ function __construct($level, $content) { parent::__construct($content); $this->level = (int) $level; if ($this->level < 1 || $this->level > 6) { throw new InvalidArgumentException("illegal level {$level}"); } }
/** * Create table cell. * * @param string $content content * @param int $type */ function __construct($content, $type = self::PLAIN, $span = 1) { $this->type = $type; $this->span = $span; parent::__construct($content); }
/** * Create quote. * * @param string $cite citation source * @param string $content quotation text */ function __construct($cite, $content) { parent::__construct($content); $cite = mb_trim($cite); $this->cite = strlen($cite) ? new T_Text_Citation($cite) : null; }
/** * Create the external link. * * @param mixed $content text content */ function __construct($content, $url) { parent::__construct($content); $this->url = $url; }