-
-
Save tonydub/5e6d9f86525b29dc05b825cc2f0be6df to your computer and use it in GitHub Desktop.
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
<?php | |
class Repository | |
{ | |
public function findAll(): array | |
{ | |
return $this->connection->project( | |
sprintf('SELECT * FROM %s', self::TABLE_NAME), | |
[], | |
function(array $row): Domain\MyObject { | |
return Domain\MyObject::fromState($row); | |
} | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment