Esempio n. 1
0
 /**
  * Create a paste instance from its XML representation.
  * @param \DOMElement $element The `<paste>` element to parse.
  * @param \Brush\Accounts\Account $owner The optional owner of this paste. Omit if anonymous.
  * @return \Brush\Pastes\Paste The created paste.
  */
 private static function fromXml(DOMElement $element, Account $owner = null)
 {
     $paste = new Paste();
     $paste->parse($element);
     if ($owner !== null) {
         $paste->setOwner($owner);
     }
     return $paste;
 }