| @@ 54-64 (lines=11) @@ | ||
| 51 | * |
|
| 52 | * @param string $path path of node for which to delete properties |
|
| 53 | */ |
|
| 54 | public function delete($path) { |
|
| 55 | $node = $this->getNodeForPath($path); |
|
| 56 | if (is_null($node)) { |
|
| 57 | return; |
|
| 58 | } |
|
| 59 | ||
| 60 | $statement = $this->connection->prepare(self::DELETE_BY_PATH_STMT); |
|
| 61 | $statement->execute([$path]); |
|
| 62 | $statement->closeCursor(); |
|
| 63 | $this->offsetUnset($path); |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * This method is called after a successful MOVE |
|
| @@ 74-83 (lines=10) @@ | ||
| 71 | * |
|
| 72 | * @return void |
|
| 73 | */ |
|
| 74 | public function move($source, $destination) { |
|
| 75 | $node = $this->getNodeForPath($source); |
|
| 76 | if (is_null($node)) { |
|
| 77 | return; |
|
| 78 | } |
|
| 79 | ||
| 80 | $statement = $this->connection->prepare(self::UPDATE_BY_PATH_STMT); |
|
| 81 | $statement->execute([$destination, $source]); |
|
| 82 | $statement->closeCursor(); |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * @inheritdoc |
|
| @@ 55-66 (lines=12) @@ | ||
| 52 | * |
|
| 53 | * @param string $path path of node for which to delete properties |
|
| 54 | */ |
|
| 55 | public function delete($path) { |
|
| 56 | $node = $this->getNodeForPath($path); |
|
| 57 | if (is_null($node)) { |
|
| 58 | return; |
|
| 59 | } |
|
| 60 | ||
| 61 | $fileId = $node->getId(); |
|
| 62 | $statement = $this->connection->prepare(self::DELETE_BY_ID_STMT); |
|
| 63 | $statement->execute([$fileId]); |
|
| 64 | $this->offsetUnset($fileId); |
|
| 65 | $statement->closeCursor(); |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * This method is called after a successful MOVE |
|