public static function newFromHeaders($headers) {
    $acl = new ACL();

    // READ rules.
    $rules = array();
    if (!empty($headers[self::HEADER_READ])) {
      $read = $headers[self::HEADER_READ];
      $rules = explode(',', $read);
      foreach ($rules as $rule) {
        $ruleArray = self::parseRule(self::READ, $rule);
        if (!empty($ruleArray)) {
          $acl->rules[] = $ruleArray;
        }
      }
    }

    // WRITE rules.
    $rules = array();
    if (!empty($headers[self::HEADER_WRITE])) {
      $write = $headers[self::HEADER_WRITE];
      $rules = explode(',', $write);
      foreach ($rules as $rule) {
        $ruleArray = self::parseRule(self::WRITE, $rule);
        if (!empty($ruleArray)) {
          $acl->rules[] = $ruleArray;
        }
      }
    }

    //throw new \Exception(print_r($acl->rules(), TRUE));

    return $acl;
  }