abstract class RepositoryBase
{
protected $connection;//This is PDO Object!
public function __construct(PDO $connection = null)
{
$this->connection = $connection;
if ($this->connection === null) {
$this->connection = new PDO(
'mysql:host=localhost:3307;dbname=project',
'root',
'usbw'
);
$this->connection->setAttribute(
PDO::ATTR_ERRMODE,
PDO::ERRMODE_EXCEPTION
);
}
}
pdo set names utf8 <-- how can i do it