예제 #1
0
 public function __construct($baseUrl, ConsumerCredentials $consumerCredentials, TokenCredentials $tokenCredentials = NULL, $cdbXmlVersion = '3.2')
 {
     parent::__construct($baseUrl, $consumerCredentials, $tokenCredentials);
     $this->cdbXmlVersion = $cdbXmlVersion;
     $this->cdbXmlNamespaceUri = \CultureFeed_Cdb_Xml::namespaceUriForVersion($this->cdbXmlVersion);
 }
예제 #2
0
파일: Default.php 프로젝트: RustiSub/Cdb
 /**
  * Creates a CultureFeed_Cdb_Default class.
  *
  * @param string $cdb_schema_version
  */
 public function __construct($cdb_schema_version = '3.2')
 {
     $this->cdb_schema_version = $cdb_schema_version;
     $this->cdb_schema_url = CultureFeed_Cdb_Xml::namespaceUriForVersion($this->cdb_schema_version);
 }
 /**
  * @test
  */
 public function it_dispatches_label_added_commands_when_applying_organizer_updated_from_udb2()
 {
     $cdbXml = file_get_contents(__DIR__ . '/Samples/organizer.xml');
     $cdbXmlNamespaceUri = \CultureFeed_Cdb_Xml::namespaceUriForVersion('3.3');
     $organizerUpdatedFromUDB2 = new OrganizerUpdatedFromUDB2('0105bc28-2368-4f89-8ea1-001c6c301065', $cdbXml, $cdbXmlNamespaceUri);
     $this->labelImporter->handle(DomainMessage::recordNow('0105bc28-2368-4f89-8ea1-001c6c301065', 1, new Metadata([]), $organizerUpdatedFromUDB2));
 }
예제 #4
0
 public function testConstructorWithoutSpecificVersion()
 {
     $cdbXml = new CultureFeed_Cdb_Default();
     $this->assertEquals(CultureFeed_Cdb_Xml::namespaceUriForVersion('3.2'), $cdbXml->getSchemaUrl());
     $this->assertEquals('3.2', $cdbXml->getSchemaVersion());
 }
 /**
  * @param ActorUpdated $actorUpdated
  * @param DomainMessage $message
  */
 private function applyActorUpdated(ActorUpdated $actorUpdated, DomainMessage $message)
 {
     $this->setLogContextFromDomainMessage($message);
     $xml = $this->getActorXml($actorUpdated->getUrl());
     $enrichedActorUpdated = ActorUpdatedEnrichedWithCdbXml::fromActorUpdated($actorUpdated, $xml, new StringLiteral(\CultureFeed_Cdb_Xml::namespaceUriForVersion('3.3')));
     $this->publish($enrichedActorUpdated, $message->getMetadata());
 }