protected function fetchPropertyValues($payload)
    {
        $propertyMap = $this->getPropertiesMap();
        $data = [];
        foreach ($payload['data'] as $resource) {
            $resource = (object)$resource;
            $resource = new \core_kernel_classes_Resource($resource->subject);
            $resourceData = $resource->getPropertiesValues($propertyMap);
            $entityInfo = array_map(function($row) use($resourceData) {
                $stringData = array_map(function($value){
                    return ($value instanceof \core_kernel_classes_Resource) ? $value->getUri() : (string) $value;
                }, $resourceData[$row]);
                return join(',', $stringData);
            }, $propertyMap);

            $entityInfo['uri'] = $resource->getUri();
            $entityInfo['id'] = \tao_helpers_Uri::encode($resource->getUri());
            $data[] = $entityInfo;
        }
        $payload['data'] = $data;

        return $payload;
    }
protected function fetchPropertyValues($payload)
    {
        $propertyMap = $this->getPropertiesMap();
        $data = [];
        foreach ($payload['data'] as $resource) {
            $resource = (object)$resource;
            $resource = new \core_kernel_classes_Resource($resource->subject);
            $resourceData = $resource->getPropertiesValues($propertyMap);
            $entityInfo = array_map(function($row) use($resourceData) {
                $stringData = array_map(function($value){
                    return ($value instanceof \core_kernel_classes_Resource) ? $value->getUri() : (string) $value;
                }, $resourceData[$row]);
                return join(',', $stringData);
            }, $propertyMap);

            $entityInfo['uri'] = $resource->getUri();
            $entityInfo['id'] = \tao_helpers_Uri::encode($resource->getUri());
            $data[] = $entityInfo;
        }
        $payload['data'] = $data;

        return $payload;
    }
protected function fetchPropertyValues ( $ payload ) { $ propertyMap = $ this -> getPropertiesMap ( ) ; $ data = [ ] ; foreach ( $ payload [ 'data' ] as $ resource ) { $ resource = ( object ) $ resource ; $ resource = new \ core_kernel_classes_Resource ( $ resource -> subject ) ; $ resourceData = $ resource -> getPropertiesValues ( $ propertyMap ) ; $ entityInfo = array_map ( function ( $ row ) use ( $ resourceData ) { $ stringData = array_map ( function ( $ value ) { return ( $ value instanceof \ core_kernel_classes_Resource ) ? $ value -> getUri ( ) : ( string ) $ value ; } , $ resourceData [ $ row ] ) ; return join ( ',' , $ stringData ) ; } , $ propertyMap ) ; $ entityInfo [ 'uri' ] = $ resource -> getUri ( ) ; $ entityInfo [ 'id' ] = \ tao_helpers_Uri :: encode ( $ resource -> getUri ( ) ) ; $ data [ ] = $ entityInfo ; } $ payload [ 'data' ] = $ data ; return $ payload ; }
Fetch all the values of properties listed in properties map

@param $payload
@return mixed
@throws \common_exception_InvalidArgumentType
Fetch all the values of properties listed in properties map