Modify digitalWrite

how would your custom digitalWrite function know about the Adafruit_MCP23008 configuration?