Skip to content

Instantly share code, notes, and snippets.

View yourwebmaker's full-sized avatar
🍊
Back to Reality!

Daniel Lima yourwebmaker

🍊
Back to Reality!
  • Netherlands
View GitHub Profile
@rponte
rponte / using-uuid-as-pk.md
Last active June 18, 2024 00:27
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

<?php
class TabRepository
{
private $mapping;
public function __construct(/*...*/, TabMapping $mapping)
{
$this->mapping = $mapping;
}
@guilhermeblanco
guilhermeblanco / CacheInterface.php
Created October 14, 2013 20:08
PSR 8 - Multi-operation Cache
<?php
namespace Psr\Cache;
interface CacheInterface extends PSR6SimplifiedCacheInterface, \IteratorAggregate
{
/**
* Gets a collection of entries from the CacheInterface, returning them as
* Map of the values associated with the set of keys requested.
* If no TransactionInterface is provided, it will return all entries stored
@guilhermeblanco
guilhermeblanco / CacheInterface.php
Last active December 25, 2015 13:08
PSR 7: Managed Cache
<?php
namespace Psr\Cache;
interface CacheInterface extends PSR6SimplifiedCacheInterface
{
/**
* Retrieve the Cache Manager.
*
* @return ManagerInterface
@guilhermeblanco
guilhermeblanco / CacheInterface.php
Created October 14, 2013 19:13
PSR-6: Simple Cache
<?php
namespace Psr\Cache;
interface CacheInterface extends \ArrayAccess
{
/**
* Retrieve a Cache Entry.
*
* @param string $key