src/SwiftAdapter.php
protected function normalizeObject(StorageObject $object)
    {
        $name = $this->removePathPrefix($object->name);
        $mimetype = explode('; ', $object->contentType);

        if ($object->lastModified instanceof \DateTimeInterface) {
            $timestamp = $object->lastModified->getTimestamp();
        } else {
            $timestamp = strtotime($object->lastModified);
        }

        return [
            'type'      => 'file',
            'dirname'   => Util::dirname($name),
            'path'      => $name,
            'timestamp' => $timestamp,
            'mimetype'  => reset($mimetype),
            'size'      => $object->contentLength,
        ];
    }
protected function normalizeObject(StorageObject $object)
    {
        $name = $this->removePathPrefix($object->name);
        $mimetype = explode('; ', $object->contentType);

        if ($object->lastModified instanceof \DateTimeInterface) {
            $timestamp = $object->lastModified->getTimestamp();
        } else {
            $timestamp = strtotime($object->lastModified);
        }

        return [
            'type'      => 'file',
            'dirname'   => Util::dirname($name),
            'path'      => $name,
            'timestamp' => $timestamp,
            'mimetype'  => reset($mimetype),
            'size'      => $object->contentLength,
        ];
    }
protected function normalizeObject ( StorageObject $ object ) { $ name = $ this -> removePathPrefix ( $ object -> name ) ; $ mimetype = explode ( '; ' , $ object -> contentType ) ; if ( $ object -> lastModified instanceof \ DateTimeInterface ) { $ timestamp = $ object -> lastModified -> getTimestamp ( ) ; } else { $ timestamp = strtotime ( $ object -> lastModified ) ; } return [ 'type' => 'file' , 'dirname' => Util :: dirname ( $ name ) , 'path' => $ name , 'timestamp' => $ timestamp , 'mimetype' => reset ( $ mimetype ) , 'size' => $ object -> contentLength , ] ; }
Normalize Openstack "StorageObject" object into an array

@param StorageObject $object
@return array
Normalize Openstack StorageObject object into an array