Skip to content

Instantly share code, notes, and snippets.

View jimwins's full-sized avatar

Jim Winstead jimwins

View GitHub Profile
@jimwins
jimwins / test.php
Last active February 10, 2025 02:03
A concept for an Entity class that hydrates from a PDO result row
<?php
declare(strict_types=1);
/**
* An example of a value object
*/
class EmailAddress
{
private function __construct(
@jimwins
jimwins / dump-printers.php
Created February 23, 2019 20:20
Use Smalot\Cups to dump a list of printers available from a host
<pre>
<?php
include 'vendor/autoload.php';
use Smalot\Cups\Builder\Builder;
use Smalot\Cups\Manager\PrinterManager;
use Smalot\Cups\Transport\Client;
use Smalot\Cups\Transport\ResponseParser;