original_string: public function getPaths()
      {
          $folderType = $this->getSession()->getTypeDefinition((string) BaseTypeId::cast(BaseTypeId::CMIS_FOLDER));
  
          $propertyDefinition = $folderType->getPropertyDefinition(PropertyIds::PATH);
          $pathQueryName = ($propertyDefinition === null) ? null : $propertyDefinition->getQueryName();
  
          // get object paths of the parent folders
          $bindingParents = $this->getBinding()->getNavigationService()->getObjectParents(
              $this->getRepositoryId(),
              $this->getId(),
              $pathQueryName,
              false,
              IncludeRelationships::cast(IncludeRelationships::NONE),
              Constants::RENDITION_NONE,
              true,
              null
          );
          $paths = [];
          foreach ($bindingParents as $parent) {
              if ($parent->getObject()->getProperties() === null) {
                  // that should never happen but could in case of an faulty repository implementation
                  throw new CmisRuntimeException('Repository sent invalid data! No properties given.');
              }
  
              $parentProperties = $parent->getObject()->getProperties()->getProperties();
              $pathProperty = null;
  
              if (isset($parentProperties[PropertyIds::PATH])) {
                  $pathProperty = $parentProperties[PropertyIds::PATH];
              }
  
              if (!$pathProperty instanceof PropertyStringInterface) {
                  // the repository sent an object without a valid path...
                  throw new CmisRuntimeException('Repository sent invalid data! Path is not set!');
              }
  
              if ($parent->getRelativePathSegment() === null) {
                  throw new CmisRuntimeException('Repository sent invalid data! No relative path segement!');
              }
  
              $folderPath = rtrim((string) $pathProperty->getFirstValue(), '/') . '/';
              $paths[] = $folderPath . $parent->getRelativePathSegment();
          }
  
          return $paths;
      }
code: public function getPaths()
      {
          $folderType = $this->getSession()->getTypeDefinition((string) BaseTypeId::cast(BaseTypeId::CMIS_FOLDER));
  
          $propertyDefinition = $folderType->getPropertyDefinition(PropertyIds::PATH);
          $pathQueryName = ($propertyDefinition === null) ? null : $propertyDefinition->getQueryName();
  
          // get object paths of the parent folders
          $bindingParents = $this->getBinding()->getNavigationService()->getObjectParents(
              $this->getRepositoryId(),
              $this->getId(),
              $pathQueryName,
              false,
              IncludeRelationships::cast(IncludeRelationships::NONE),
              Constants::RENDITION_NONE,
              true,
              null
          );
          $paths = [];
          foreach ($bindingParents as $parent) {
              if ($parent->getObject()->getProperties() === null) {
                  // that should never happen but could in case of an faulty repository implementation
                  throw new CmisRuntimeException('Repository sent invalid data! No properties given.');
              }
  
              $parentProperties = $parent->getObject()->getProperties()->getProperties();
              $pathProperty = null;
  
              if (isset($parentProperties[PropertyIds::PATH])) {
                  $pathProperty = $parentProperties[PropertyIds::PATH];
              }
  
              if (!$pathProperty instanceof PropertyStringInterface) {
                  // the repository sent an object without a valid path...
                  throw new CmisRuntimeException('Repository sent invalid data! Path is not set!');
              }
  
              if ($parent->getRelativePathSegment() === null) {
                  throw new CmisRuntimeException('Repository sent invalid data! No relative path segement!');
              }
  
              $folderPath = rtrim((string) $pathProperty->getFirstValue(), '/') . '/';
              $paths[] = $folderPath . $parent->getRelativePathSegment();
          }
  
          return $paths;
      }
code_tokens: public function getPaths ( ) { $ folderType = $ this -> getSession ( ) -> getTypeDefinition ( ( string ) BaseTypeId :: cast ( BaseTypeId :: CMIS_FOLDER ) ) ; $ propertyDefinition = $ folderType -> getPropertyDefinition ( PropertyIds :: PATH ) ; $ pathQueryName = ( $ propertyDefinition === null ) ? null : $ propertyDefinition -> getQueryName ( ) ; // get object paths of the parent folders $ bindingParents = $ this -> getBinding ( ) -> getNavigationService ( ) -> getObjectParents ( $ this -> getRepositoryId ( ) , $ this -> getId ( ) , $ pathQueryName , false , IncludeRelationships :: cast ( IncludeRelationships :: NONE ) , Constants :: RENDITION_NONE , true , null ) ; $ paths = [ ] ; foreach ( $ bindingParents as $ parent ) { if ( $ parent -> getObject ( ) -> getProperties ( ) === null ) { // that should never happen but could in case of an faulty repository implementation throw new CmisRuntimeException ( 'Repository sent invalid data! No properties given.' ) ; } $ parentProperties = $ parent -> getObject ( ) -> getProperties ( ) -> getProperties ( ) ; $ pathProperty = null ; if ( isset ( $ parentProperties [ PropertyIds :: PATH ] ) ) { $ pathProperty = $ parentProperties [ PropertyIds :: PATH ] ; } if ( ! $ pathProperty instanceof PropertyStringInterface ) { // the repository sent an object without a valid path... throw new CmisRuntimeException ( 'Repository sent invalid data! Path is not set!' ) ; } if ( $ parent -> getRelativePathSegment ( ) === null ) { throw new CmisRuntimeException ( 'Repository sent invalid data! No relative path segement!' ) ; } $ folderPath = rtrim ( ( string ) $ pathProperty -> getFirstValue ( ) , '/' ) . '/' ; $ paths [ ] = $ folderPath . $ parent -> getRelativePathSegment ( ) ; } return $ paths ; }
docstring: Returns the paths of this object.
  
  @return string[] the list of paths of this object or an empty list if this object is unfiled or if this object
  is the root folder
  @throws CmisRuntimeException Throws exception if repository sends invalid data
docstring_tokens: Returns the paths of this object .