<?php
class Class1
{
    public $property1;
    public $property2;

    public function __construct(array $values = $this->createArrayWithEmptyStrings())
    {
        foreach ($this as $property => $value) {
            $this->$property = $values[$property];
        }
    }
    
    protected function createArrayWithEmptyStrings()
    {
        $values = array();
        foreach ($this as $property => $value) {
            $values[$this->$property] = "";
        }
        return $values;
    }
}
?>
