/**
  * @param RepositoryCapabilities $repositoryCapabilities
  * @param AclCapabilities $aclCapabilities
  * @return RepositoryInfoBrowserBinding
  */
 protected function getExpectedRepositoryInfoObjectForFullRequest($repositoryCapabilities, $aclCapabilities)
 {
     $repositoryInfo = new RepositoryInfoBrowserBinding();
     $repositoryInfo->setId('A1');
     $repositoryInfo->setName('Apache Chemistry OpenCMIS InMemory Repository');
     $repositoryInfo->setCmisVersion(CmisVersion::cast(CmisVersion::CMIS_1_1));
     $repositoryInfo->setDescription('Apache Chemistry OpenCMIS InMemory Repository (Version: ?)');
     $repositoryInfo->setVendorName('Apache Chemistry');
     $repositoryInfo->setProductName('OpenCMIS InMemory-Server');
     $repositoryInfo->setProductVersion('?');
     $repositoryInfo->setRootFolderId('100');
     $repositoryInfo->setRepositoryUrl('http://www.example.com:8080/inmemory/browser/A1');
     $repositoryInfo->setCapabilities($repositoryCapabilities);
     $repositoryInfo->setRootUrl('http://www.example.com:8080/inmemory/browser/A1/root');
     $repositoryInfo->setAclCapabilities($aclCapabilities);
     $repositoryInfo->setLatestChangeLogToken('0');
     $repositoryInfo->setCmisVersion(CmisVersion::cast('1.1'));
     $repositoryInfo->setChangesIncomplete(true);
     $repositoryInfo->setChangesOnType(array(BaseTypeId::cast(BaseTypeId::CMIS_DOCUMENT)));
     $repositoryInfo->setPrincipalIdAnonymous('anonymous');
     $repositoryInfo->setPrincipalIdAnyone('anyone');
     $repositoryInfo->setExtensions($this->cmisExtensionsDummy);
     $extensionFeature = new ExtensionFeature();
     $extensionFeature->setId('E1');
     $extensionFeature->setUrl('http://foo.bar.baz');
     $extensionFeature->setCommonName('commonName');
     $extensionFeature->setVersionLabel('versionLabel');
     $extensionFeature->setDescription('Description');
     $extensionFeature->setFeatureData(array('foo' => 'bar'));
     $extensionFeature->setExtensions($this->cmisExtensionsDummy);
     $repositoryInfo->setExtensionFeatures(array($extensionFeature));
     return $repositoryInfo;
 }
 /**
  * Convert given input data to an ExtensionFeature object
  *
  * @param array|null $data
  * @return ExtensionFeature[]
  */
 public function convertExtensionFeatures(array $data = null)
 {
     $features = array();
     if (empty($data)) {
         return $features;
     }
     foreach ($data as $extendedFeature) {
         if (!is_array($extendedFeature) || empty($extendedFeature)) {
             continue;
         }
         $feature = new ExtensionFeature();
         $feature->setId((string) $extendedFeature[JSONConstants::JSON_FEATURE_ID]);
         $feature->setUrl((string) $extendedFeature[JSONConstants::JSON_FEATURE_URL]);
         $feature->setCommonName((string) $extendedFeature[JSONConstants::JSON_FEATURE_COMMON_NAME]);
         $feature->setVersionLabel((string) $extendedFeature[JSONConstants::JSON_FEATURE_VERSION_LABEL]);
         $feature->setDescription((string) $extendedFeature[JSONConstants::JSON_FEATURE_DESCRIPTION]);
         if (isset($extendedFeature[JSONConstants::JSON_FEATURE_DATA]) && is_array($extendedFeature[JSONConstants::JSON_FEATURE_DATA])) {
             $data = array();
             foreach ($extendedFeature[JSONConstants::JSON_FEATURE_DATA] as $key => $value) {
                 $data[$key] = $value;
             }
             $feature->setFeatureData($data);
         }
         $feature->setExtensions($this->convertExtension($extendedFeature, JSONConstants::getFeatureKeys()));
         $features[] = $feature;
     }
     return $features;
 }