private function loadAllObjects(): array
    {
        if (!file_exists($this->databaseFilePath)) {
            return [];
        }

        $objects = Serializer::deserialize("{$this->className}[]", file_get_contents($this->databaseFilePath));

        Assertion::allIsInstanceOf($objects, $this->className);

        return $objects;
    }
private function loadAllObjects(): array
    {
        if (!file_exists($this->databaseFilePath)) {
            return [];
        }

        $objects = Serializer::deserialize("{$this->className}[]", file_get_contents($this->databaseFilePath));

        Assertion::allIsInstanceOf($objects, $this->className);

        return $objects;
    }
private function loadAllObjects ( ) : array { if ( ! file_exists ( $ this -> databaseFilePath ) ) { return [ ] ; } $ objects = Serializer :: deserialize ( "{$this->className}[]" , file_get_contents ( $ this -> databaseFilePath ) ) ; Assertion :: allIsInstanceOf ( $ objects , $ this -> className ) ; return $ objects ; }
Load all previously persisted objects from disk.

@return array A list of objects of type $className
Load all previously persisted objects from disk .