Пример #1
0
 /**
  * Write party metadata to the XMLWriter.
  *
  *
  * @param \XMLWriter $xml The XMLWriter to write to
  * @param \F3\FLOW3\Package\MetaData\AbstractParty $party The party to write
  * @return void
  * @author Christopher Hlubek <*****@*****.**>
  */
 protected function writeParty(\XMLWriter $xml, \F3\FLOW3\Package\MetaData\AbstractParty $party)
 {
     $xml->startElement($party->getPartyType());
     if (strlen($party->getRole())) {
         $xml->writeAttribute('role', $party->getRole());
     }
     if (strlen($party->getName())) {
         $xml->writeElement('name', $party->getName());
     }
     if (strlen($party->getEmail())) {
         $xml->writeElement('email', $party->getEmail());
     }
     if (strlen($party->getWebsite())) {
         $xml->writeElement('website', $party->getWebsite());
     }
     switch ($party->getPartyType()) {
         case 'person':
             if (strlen($party->getCompany())) {
                 $xml->writeElement('company', $party->getCompany());
             }
             if (strlen($party->getRepositoryUserName())) {
                 $xml->writeElement('repositoryUserName', $party->getRepositoryUserName());
             }
             break;
         case 'company':
             break;
     }
     $xml->endElement();
 }
Пример #2
0
 /**
  * Meta data person model constructor
  *
  * @param string $role
  * @param string $name
  * @param string $email
  * @param string $website
  * @param string $company
  * @param string $repositoryUserName
  * @author Christopher Hlubek <*****@*****.**>
  */
 public function __construct($role, $name, $email = NULL, $website = NULL, $company = NULL, $repositoryUserName = NULL)
 {
     parent::__construct($role, $name, $email, $website);
     $this->company = $company;
     $this->repositoryUserName = $repositoryUserName;
 }