Limpieza de objetos externos

This commit is contained in:
2022-08-08 22:36:04 -04:00
parent a9968dec58
commit cdb4b382b7
57 changed files with 1210 additions and 339 deletions

View File

@ -0,0 +1,14 @@
<?php
namespace Psr\Collection;
use Iterator, ArrayAccess, Countable;
interface CollectionInterface extends Iterator, ArrayAccess, Countable
{
public function set(mixed $name, $value): CollectionInterface;
public function has(mixed $name): bool;
public function get(mixed $name);
public function remove(mixed $name): CollectionInterface;
public static function fromArray(array $source): CollectionInterface;
public static function fromObject(object $source): CollectionInterface;
}

View File

@ -0,0 +1,29 @@
<?php
namespace Psr\Database;
use PDO;
interface DatabaseInterface
{
public function setHost(string $host, ?int $port = null): DatabaseInterface;
public function getHost(): string;
public function getPort(): int;
public function setName(string $database_name): DatabaseInterface;
public function getName(): string;
public function setUser(string $username, string $password): DatabaseInterface;
public function getUser(): string;
public function getPassword(): string;
public function getDsn(): string;
public function needsUser(): bool;
public function connect(): DatabaseInterface;
public function getConnection(): PDO;
public function beginTransaction(): void;
public function commit(): void;
public function rollBack(): void;
public function query(string $query): array;
public function prepare(string $query): DatabaseInterface;
public function execute(array $data): array;
public function insert(array $values): void;
public function update(array $data): void;
public function delete(array $data): void;
}