예제 #1
0
 /**
  * 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}");
     }
 }
예제 #2
0
 /**
  * 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);
 }
예제 #3
0
파일: Quote.php 프로젝트: robtuley/knotwerk
 /**
  * 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;
 }
예제 #4
0
 /**
  * Create the external link.
  *
  * @param mixed $content  text content
  */
 function __construct($content, $url)
 {
     parent::__construct($content);
     $this->url = $url;
 }