forked from danog/MadelineProto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
93 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace danog\MadelineProto\Db; | ||
|
||
use AssertionError; | ||
use danog\AsyncOrm\DbArray; | ||
use danog\AsyncOrm\DbArrayBuilder; | ||
use danog\AsyncOrm\Internal\Containers\CacheContainer; | ||
|
||
/** | ||
* @internal | ||
* @deprecated Please use https://github.com/danog/AsyncOrm | ||
*/ | ||
final class CachedArray extends DbArray | ||
{ | ||
private readonly CacheContainer $cache; | ||
|
||
public function unset(string|int $key): void | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
public function set(string|int $key, mixed $value): void | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
public function get(string|int $key): mixed | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
public function clear(): void | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
public function count(): int | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
public function getIterator(): \Traversable | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
|
||
public static function getInstance(DbArrayBuilder $config, DbArray|null $previous): DbArray | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace danog\MadelineProto\Db; | ||
|
||
use ArrayObject; | ||
use AssertionError; | ||
use danog\AsyncOrm\DbArray; | ||
use danog\AsyncOrm\DbArrayBuilder; | ||
|
||
/** | ||
* @internal | ||
* @deprecated Please use https://github.com/danog/AsyncOrm | ||
*/ | ||
final class MemoryArray extends ArrayObject | ||
{ | ||
public function unset(string|int $key): void | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
public function set(string|int $key, mixed $value): void | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
public function get(string|int $key): mixed | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
public function clear(): void | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
public function count(): int | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
public function getIterator(): \Iterator | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
|
||
public static function getInstance(DbArrayBuilder $config, DbArray|null $previous): DbArray | ||
{ | ||
throw new AssertionError("Unreachable"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters