コード例 #1
0
ファイル: Version.php プロジェクト: TheSkyNet/youtrack-php
 /**
  * Version constructor.
  * @param \SimpleXMLElement|NULL $xml
  * @param Connection|NULL $youtrack
  */
 public function __construct(\SimpleXMLElement $xml = NULL, Connection $youtrack = NULL)
 {
     parent::__construct($xml, $youtrack);
     $check = $this->__get('description');
     if (empty($check)) {
         $this->__set('description', '');
     }
     $check = $this->__get('releaseDate');
     if (empty($check)) {
         $this->__set('releaseDate', NULL);
     }
 }
コード例 #2
0
ファイル: Issue.php プロジェクト: TheSkyNet/youtrack-php
 public function __construct(\SimpleXMLElement $xml = NULL, Connection $youtrack = NULL)
 {
     parent::__construct($xml, $youtrack);
     if (!empty($xml)) {
         if (!empty($this->attributes['links'])) {
             $links = [];
             foreach ($xml->xpath('//field[@name="links"]') as $node) {
                 foreach ($node->children() as $link) {
                     $links[(string) $link] = ['type' => (string) $link->attributes()->type, 'role' => (string) $link->attributes()->role];
                 }
             }
             $this->__set('links', $links);
         }
         if (!empty($this->attributes['attachments'])) {
             $attachments = array();
             foreach ($xml->xpath('//field[@name="attachments"]') as $node) {
                 foreach ($node->children() as $attachment) {
                     $attachments[(string) $attachment] = ['url' => (string) $attachment->attributes()->url];
                 }
             }
             $this->__set('attachments', $attachments);
         }
     }
 }
コード例 #3
0
 /**
  * ProjectCustomField constructor.
  * @param \SimpleXMLElement|NULL $xml
  * @param Connection|NULL $youtrack
  */
 public function __construct(\SimpleXMLElement $xml = NULL, Connection $youtrack = NULL)
 {
     parent::__construct($xml, $youtrack);
 }