public function setDir($dir)
    {
        if (in_array($dir, Direction::asArray(), true) === true) {
            $this->dir = $dir;
        } else {
            $msg = "The 'dir' argument must be a value from the Direction enumeration.";
            throw new InvalidArgumentException($msg);
        }
    }