League\CommonMark\Inline\Element\AbstractWebResource::__construct PHP Method

__construct() public method

public __construct ( $url )
    public function __construct($url)
    {
        $this->url = $url;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @param string                 $url
  * @param ArrayCollection|string $label
  * @param string                 $title
  */
 public function __construct($url, $label = '', $title = '')
 {
     parent::__construct($url);
     if (is_string($label)) {
         $this->setChildren(new ArrayCollection([new Text($label)]));
     } else {
         $this->setChildren($label);
     }
     if (!empty($title)) {
         $this->data['title'] = $title;
     }
 }
All Usage Examples Of League\CommonMark\Inline\Element\AbstractWebResource::__construct